non-existent files have size 0

This commit is contained in:
ansuz 2017-06-13 11:47:22 +02:00
parent a57f8679c5
commit 100cc1792a

9
rpc.js
View file

@ -336,8 +336,13 @@ var getMultipleFileSize = function (Env, channels, cb) {
channels.forEach(function (channel) {
getFileSize(Env, channel, function (e, size) {
if (e) {
WARN('getFileSize', e);
counts[channel] = -1;
// most likely error here is that a file no longer exists
// but a user still has it in their drive, and wants to know
// its size. We should find a way to inform them of this in
// the future. For now we can just tell them it has no size.
//WARN('getFileSize', e);
counts[channel] = 0;
return done();
}
counts[channel] = size;