fix(edit) wrong file name on win

This commit is contained in:
coderaiser 2014-11-20 11:45:17 -05:00
parent b98b2e9037
commit adad842d7e

View file

@ -9,7 +9,9 @@
CloudFunc = require(DIR_LIB + 'cloudfunc'),
patch = require(DIR_SERVER + 'patch'),
files = require(DIR_SERVER + 'files'),
hash = require(DIR_SERVER + 'hash');
hash = require(DIR_SERVER + 'hash'),
tryRequire = require('./tryRequire'),
mellow = tryRequire('mellow', {log: true, exit: true});
module.exports = function(sock) {
Util.check(arguments, ['socket']);
@ -21,6 +23,8 @@
size: CloudFunc.MAX_FILE_SIZE
};
name = mellow.convertPath(name);
getHash(name, function(error, hash) {
if (error)
socket.emit('err', error);