@@ -243,15 +243,15 @@ class LDP {
243243 throw error ( 413 , 'User has exceeded their storage quota' )
244244 }
245245 // Set url using folder/.meta. This is Hack to find folder path
246- if ( container ) {
247- if ( typeof url !== 'string' ) {
248- url . url = url . url + suffixMeta
249- } else {
250- url = url + suffixMeta
251- }
252- contentType = 'text/turtle'
253- }
254- const { path } = await this . resourceMapper . mapUrlToFile ( { url , contentType , createIfNotExists : true } )
246+ let { path } = await this . resourceMapper . mapUrlToFile ( {
247+ url,
248+ contentType ,
249+ createIfNotExists : true ,
250+ searchIndex : false
251+ } )
252+
253+ if ( container ) { path += suffixMeta }
254+
255255 // debug.handlers(container + ' item ' + (url.url || url) + ' ' + contentType + ' ' + path)
256256 // check if file exists, and in that case that it has the same extension
257257 if ( ! container ) { await this . checkFileExtension ( url , path ) }
@@ -264,7 +264,7 @@ class LDP {
264264 // clearAclCache()
265265 }
266266 // Directory created, now write the file
267- if ( container ) return
267+ // if (container) return // alain
268268 return withLock ( path , ( ) => new Promise ( ( resolve , reject ) => {
269269 // HACK: the middleware in webid-oidc.js uses body-parser, thus ending the stream of data
270270 // for JSON bodies. So, the stream needs to be reset
0 commit comments