fix: Use posix path library to be OS independent

This commit is contained in:
Joachim Van Herwegen
2020-08-18 14:34:32 +02:00
parent 381dae42f6
commit b489d69bad
2 changed files with 6 additions and 2 deletions

View File

@@ -5,6 +5,7 @@ import { InteractionController } from '../util/InteractionController';
import { MetadataController } from '../util/MetadataController';
import { MethodNotAllowedHttpError } from '../util/errors/MethodNotAllowedHttpError';
import { NotFoundHttpError } from '../util/errors/NotFoundHttpError';
import { posix } from 'path';
import { Quad } from 'rdf-js';
import { Readable } from 'stream';
import { Representation } from '../ldp/representation/Representation';
@@ -16,7 +17,8 @@ import { UnsupportedMediaTypeHttpError } from '../util/errors/UnsupportedMediaTy
import { CONTENT_TYPE_QUADS, DATA_TYPE_BINARY, DATA_TYPE_QUAD } from '../util/ContentTypes';
import { createReadStream, createWriteStream, promises as fsPromises, Stats } from 'fs';
import { ensureTrailingSlash, trimTrailingSlashes } from '../util/Util';
import { extname, join as joinPath, normalize as normalizePath } from 'path';
const { extname, join: joinPath, normalize: normalizePath } = posix;
/**
* Resource store storing its data in the file system backend.