Skip to content

Commit

Permalink
fix: small fix for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
BelgianNoise committed Nov 25, 2021
1 parent 243d010 commit 0ac3bb5
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 5 deletions.
13 changes: 13 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true,
"**/Thumbs.db": true,
"**/**.json": false,
"**/**.spec.ts": false
},
"explorerExclude.backup": null
}
2 changes: 1 addition & 1 deletion config/quota-file.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
},
{
"@id": "urn:solid-server:default:SizeReporter",
"FileSizeReporter:_ignoreFolders": [ "^/\\.internal/?$" ]
"FileSizeReporter:_ignoreFolders": [ "^/\\.internal$" ]
}
]
}
2 changes: 1 addition & 1 deletion src/storage/size-reporter/FileSizeReporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export class FileSizeReporter implements SizeReporter<string> {
public constructor(fileIdentifierMapper: FileIdentifierMapper, rootFilePath: string, ignoreFolders: string[]) {
this.fileIdentifierMapper = fileIdentifierMapper;
this.ignoreFolders = ignoreFolders.map((folder: string): RegExp => new RegExp(folder, 'u'));
this.rootFilePath = rootFilePath;
this.rootFilePath = normalizeFilePath(rootFilePath);
}

/** The FileSizeReporter will always return data in the form of bytes */
Expand Down
2 changes: 1 addition & 1 deletion test/integration/config/quota-global.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
},
{
"@id": "urn:solid-server:default:SizeReporter",
"FileSizeReporter:_ignoreFolders": [ "^/\\.internal/?$" ]
"FileSizeReporter:_ignoreFolders": [ "^/\\.internal$" ]
},
{
"@id": "urn:solid-server:test:Instances",
Expand Down
2 changes: 1 addition & 1 deletion test/integration/config/quota-pod.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
},
{
"@id": "urn:solid-server:default:SizeReporter",
"FileSizeReporter:_ignoreFolders": [ "^/\\.internal/?$" ]
"FileSizeReporter:_ignoreFolders": [ "^/\\.internal$" ]
},
{
"@id": "urn:solid-server:test:Instances",
Expand Down
2 changes: 1 addition & 1 deletion test/unit/storage/size-reporter/FileSizeReporter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ describe('A FileSizeReporter', (): void => {
const fileSizeReporter = new FileSizeReporter(
mapper,
fileRoot,
[ '^/\\.internal/?$' ],
[ '^/\\.internal$' ],
);

beforeAll(async(): Promise<void> => {
Expand Down

0 comments on commit 0ac3bb5

Please sign in to comment.