From 67d748519112af95f6b06daef728f6d790ecab6c Mon Sep 17 00:00:00 2001 From: Adrien Castex Date: Thu, 8 Jun 2017 11:11:51 +0200 Subject: [PATCH] Fixed recurrent size error in the Propfind method --- lib/server/commands/Propfind.js | 2 +- src/server/commands/Propfind.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/server/commands/Propfind.js b/lib/server/commands/Propfind.js index 237301f4..6d51e956 100644 --- a/lib/server/commands/Propfind.js +++ b/lib/server/commands/Propfind.js @@ -196,7 +196,7 @@ function default_1(arg, callback) { }); }); resource.size(targetSource, function (e, size) { return process.nextTick(function () { if (!e) - prop.ele('D:getcontentlength').add(size); + prop.ele('D:getcontentlength').add(size === undefined || size === null || size.constructor !== Number ? 0 : size); nbOut(e); }); }); } diff --git a/src/server/commands/Propfind.ts b/src/server/commands/Propfind.ts index eee6b7b1..69d1cc32 100644 --- a/src/server/commands/Propfind.ts +++ b/src/server/commands/Propfind.ts @@ -254,7 +254,7 @@ export default function(arg : MethodCallArgs, callback) })) resource.size(targetSource, (e, size) => process.nextTick(() => { if(!e) - prop.ele('D:getcontentlength').add(size) + prop.ele('D:getcontentlength').add(size === undefined || size === null || size.constructor !== Number ? 0 : size) nbOut(e); })) }