|
|
@ -92,8 +92,8 @@ define([
|
|
|
|
exp.getFileSize = function (file, cb) {
|
|
|
|
exp.getFileSize = function (file, cb) {
|
|
|
|
rpc.send('GET_FILE_SIZE', file, function (e, response) {
|
|
|
|
rpc.send('GET_FILE_SIZE', file, function (e, response) {
|
|
|
|
if (e) { return void cb(e); }
|
|
|
|
if (e) { return void cb(e); }
|
|
|
|
if (response && response.length) {
|
|
|
|
if (response && response.length && typeof(response[0]) === 'number') {
|
|
|
|
cb(void 0, response[0]);
|
|
|
|
return void cb(void 0, response[0]);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
cb('INVALID_RESPONSE');
|
|
|
|
cb('INVALID_RESPONSE');
|
|
|
|
}
|
|
|
|
}
|
|
|
|