Handle Windows paths correctly (again).

This commit is contained in:
Chad Weider 2012-03-04 15:05:22 -08:00
parent 57d0a2e803
commit 0930b64c4e
1 changed files with 3 additions and 1 deletions

View File

@ -149,8 +149,10 @@ function getAceFile(callback) {
var request = require('request');
var baseURI = 'http://localhost:' + settings.port
var resourceURI = baseURI + path.normalize(path.join('/static/', filename));
resourceURI = resourceURI.replace(/\\/g, '/'); // Windows (safe generally?)
request(baseURI + path.normalize(path.join('/static/', filename)), function (error, response, body) {
request(resourceURI, function (error, response, body) {
if (!error && response.statusCode == 200) {
data += 'Ace2Editor.EMBEDED[' + JSON.stringify(filename) + '] = '
+ JSON.stringify(body || '') + ';\n';