diff --git a/lib/server/v2/webDAVServer/WebDAVServer.js b/lib/server/v2/webDAVServer/WebDAVServer.js index dd89bceb..ca7112f7 100644 --- a/lib/server/v2/webDAVServer/WebDAVServer.js +++ b/lib/server/v2/webDAVServer/WebDAVServer.js @@ -67,14 +67,14 @@ var WebDAVServer = (function () { return true; }; WebDAVServer.prototype.removeFileSystem = function (fs_path, _checkByReference, _callback) { - var checkByReference = _callback ? _checkByReference : false; + var checkByReference = _callback ? _checkByReference : true; var callback = _callback ? _callback : _checkByReference; var result = this.removeFileSystemSync(fs_path, checkByReference); if (callback) callback(result); }; WebDAVServer.prototype.removeFileSystemSync = function (fs_path, checkByReference) { - if (checkByReference === void 0) { checkByReference = false; } + if (checkByReference === void 0) { checkByReference = true; } if (fs_path.constructor === Path_1.Path || fs_path.constructor === String) { var path = new Path_1.Path(fs_path).toString(); if (this.fileSystems[path] === undefined) diff --git a/src/server/v2/webDAVServer/WebDAVServer.ts b/src/server/v2/webDAVServer/WebDAVServer.ts index 1d11af44..e9e47f50 100644 --- a/src/server/v2/webDAVServer/WebDAVServer.ts +++ b/src/server/v2/webDAVServer/WebDAVServer.ts @@ -116,7 +116,7 @@ export class WebDAVServer removeFileSystem(fs : FileSystem, checkByReference : boolean, callback : (nbRemoved ?: number) => void) : void removeFileSystem(fs_path : Path | string | FileSystem, _checkByReference : boolean | ((nbRemoved ?: number) => void), _callback ?: (nbRemoved ?: number) => void) : void { - const checkByReference = _callback ? _checkByReference as boolean : false; + const checkByReference = _callback ? _checkByReference as boolean : true; const callback = _callback ? _callback : _checkByReference as ((nbRemoved ?: number) => void); const result = this.removeFileSystemSync(fs_path as any, checkByReference); @@ -126,7 +126,7 @@ export class WebDAVServer removeFileSystemSync(path : Path | string) : number removeFileSystemSync(fs : FileSystem, checkByReference ?: boolean) : number - removeFileSystemSync(fs_path : Path | string | FileSystem, checkByReference : boolean = false) : number + removeFileSystemSync(fs_path : Path | string | FileSystem, checkByReference : boolean = true) : number { if(fs_path.constructor === Path || fs_path.constructor === String) {