mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
fix: Make mkdir recursive in FileDataAccessor
DataAccessorBasedStore already did the checks to make sure writing this container is valid and this allows us to start the server in nested non-existing folders.
This commit is contained in:
parent
49a04c4d0a
commit
30cebec32a
@ -103,7 +103,7 @@ export class FileDataAccessor implements DataAccessor {
|
||||
public async writeContainer(identifier: ResourceIdentifier, metadata: RepresentationMetadata): Promise<void> {
|
||||
const link = await this.resourceMapper.mapUrlToFilePath(identifier);
|
||||
try {
|
||||
await fsPromises.mkdir(link.filePath);
|
||||
await fsPromises.mkdir(link.filePath, { recursive: true });
|
||||
} catch (error: unknown) {
|
||||
// Don't throw if directory already exists
|
||||
if (!isSystemError(error) || error.code !== 'EEXIST') {
|
||||
|
Loading…
x
Reference in New Issue
Block a user