Skip to content

Commit

Permalink
Fix series detection
Browse files Browse the repository at this point in the history
  • Loading branch information
aldahick committed Nov 20, 2024
1 parent 5caf6b6 commit 4260857
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions api/src/service/file/file.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ export class FileService {
async stat(key: string) {
const filename = this.getFilename(key);
try {
await fs.mkdir(filename, { recursive: true });
return await fs.stat(filename);
} catch {}
}
Expand All @@ -67,7 +66,10 @@ export class FileService {
}

getFilename(key: string) {
return path.resolve(this.root, key.replace(/^\//, "").replace(/\.\./g, ""));
return path.resolve(
this.root,
key.replace(/^\//, "").replace(/\.{2}/g, ""),
);
}

get root(): string {
Expand Down

0 comments on commit 4260857

Please sign in to comment.