@@ -251,7 +251,7 @@ class LDP {
251251 }
252252
253253 // Directory created, now write the file
254- return withLock ( path , { mustExist : false } , ( ) => new Promise ( ( resolve , reject ) => {
254+ return withLock ( path , ( ) => new Promise ( ( resolve , reject ) => {
255255 // HACK: the middleware in webid-oidc.js uses body-parser, thus ending the stream of data
256256 // for JSON bodies. So, the stream needs to be reset
257257 if ( contentType . includes ( 'application/json' ) ) {
@@ -445,15 +445,15 @@ class LDP {
445445 const linkPath = this . resourceMapper . _removeDollarExtension ( path )
446446 try {
447447 // first delete file, then links with write permission only (atomic delete)
448- await withLock ( path , { mustExist : false } , ( ) => promisify ( fs . unlink ) ( path ) )
448+ await withLock ( path , ( ) => promisify ( fs . unlink ) ( path ) )
449449
450450 const aclPath = `${ linkPath } ${ this . suffixAcl } `
451451 if ( await promisify ( fs . exists ) ( aclPath ) ) {
452- await withLock ( aclPath , { mustExist : false } , ( ) => promisify ( fs . unlink ) ( aclPath ) )
452+ await withLock ( aclPath , ( ) => promisify ( fs . unlink ) ( aclPath ) )
453453 }
454454 const metaPath = `${ linkPath } ${ this . suffixMeta } `
455455 if ( await promisify ( fs . exists ) ( metaPath ) ) {
456- await withLock ( metaPath , { mustExist : false } , ( ) => promisify ( fs . unlink ) ( metaPath ) )
456+ await withLock ( metaPath , ( ) => promisify ( fs . unlink ) ( metaPath ) )
457457 }
458458 } catch ( err ) {
459459 debug . container ( 'DELETE -- unlink() error: ' + err )
0 commit comments