mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
fix: Use posix path library to be OS independent
This commit is contained in:
parent
381dae42f6
commit
b489d69bad
@ -5,6 +5,7 @@ import { InteractionController } from '../util/InteractionController';
|
|||||||
import { MetadataController } from '../util/MetadataController';
|
import { MetadataController } from '../util/MetadataController';
|
||||||
import { MethodNotAllowedHttpError } from '../util/errors/MethodNotAllowedHttpError';
|
import { MethodNotAllowedHttpError } from '../util/errors/MethodNotAllowedHttpError';
|
||||||
import { NotFoundHttpError } from '../util/errors/NotFoundHttpError';
|
import { NotFoundHttpError } from '../util/errors/NotFoundHttpError';
|
||||||
|
import { posix } from 'path';
|
||||||
import { Quad } from 'rdf-js';
|
import { Quad } from 'rdf-js';
|
||||||
import { Readable } from 'stream';
|
import { Readable } from 'stream';
|
||||||
import { Representation } from '../ldp/representation/Representation';
|
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 { CONTENT_TYPE_QUADS, DATA_TYPE_BINARY, DATA_TYPE_QUAD } from '../util/ContentTypes';
|
||||||
import { createReadStream, createWriteStream, promises as fsPromises, Stats } from 'fs';
|
import { createReadStream, createWriteStream, promises as fsPromises, Stats } from 'fs';
|
||||||
import { ensureTrailingSlash, trimTrailingSlashes } from '../util/Util';
|
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.
|
* Resource store storing its data in the file system backend.
|
||||||
|
@ -4,10 +4,10 @@ import { ConflictHttpError } from '../../../src/util/errors/ConflictHttpError';
|
|||||||
import { DataFactory } from 'n3';
|
import { DataFactory } from 'n3';
|
||||||
import { FileResourceStore } from '../../../src/storage/FileResourceStore';
|
import { FileResourceStore } from '../../../src/storage/FileResourceStore';
|
||||||
import { InteractionController } from '../../../src/util/InteractionController';
|
import { InteractionController } from '../../../src/util/InteractionController';
|
||||||
import { join as joinPath } from 'path';
|
|
||||||
import { MetadataController } from '../../../src/util/MetadataController';
|
import { MetadataController } from '../../../src/util/MetadataController';
|
||||||
import { MethodNotAllowedHttpError } from '../../../src/util/errors/MethodNotAllowedHttpError';
|
import { MethodNotAllowedHttpError } from '../../../src/util/errors/MethodNotAllowedHttpError';
|
||||||
import { NotFoundHttpError } from '../../../src/util/errors/NotFoundHttpError';
|
import { NotFoundHttpError } from '../../../src/util/errors/NotFoundHttpError';
|
||||||
|
import { posix } from 'path';
|
||||||
import { Readable } from 'stream';
|
import { Readable } from 'stream';
|
||||||
import { RepresentationMetadata } from '../../../src/ldp/representation/RepresentationMetadata';
|
import { RepresentationMetadata } from '../../../src/ldp/representation/RepresentationMetadata';
|
||||||
import streamifyArray from 'streamify-array';
|
import streamifyArray from 'streamify-array';
|
||||||
@ -18,6 +18,8 @@ import { LDP, RDF, STAT, TERMS, XML } from '../../../src/util/Prefixes';
|
|||||||
import { LINK_TYPE_LDP_BC, LINK_TYPE_LDPR } from '../../../src/util/LinkTypes';
|
import { LINK_TYPE_LDP_BC, LINK_TYPE_LDPR } from '../../../src/util/LinkTypes';
|
||||||
import { literal, namedNode, quad as quadRDF, triple } from '@rdfjs/data-model';
|
import { literal, namedNode, quad as quadRDF, triple } from '@rdfjs/data-model';
|
||||||
|
|
||||||
|
const { join: joinPath } = posix;
|
||||||
|
|
||||||
const base = 'http://test.com/';
|
const base = 'http://test.com/';
|
||||||
const root = '/Users/default/home/public/';
|
const root = '/Users/default/home/public/';
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user