Skip to content

Commit

Permalink
make tmpdirs in provided fs
Browse files Browse the repository at this point in the history
  • Loading branch information
ProgrammerIn-wonderland committed Oct 5, 2024
1 parent 9ec6afc commit 8df0f6d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/api/Filesystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1031,7 +1031,7 @@ class AnuraFilesystem implements AnuraFSOperations<any> {
mkdtemp(...args: any[]) {
// Temp directories should remain in the root filesystem for now
// @ts-ignore - Overloaded methods are scary
this.providers.get("/")!.mkdtemp(...args);
this.processPath(path).mkdtemp(...args);
}

readdir(path: string, ...rest: any[]) {
Expand Down Expand Up @@ -1186,7 +1186,7 @@ class AnuraFilesystem implements AnuraFSOperations<any> {
mkdir: (path: string, mode?: number) =>
this.processPath(path).promises.mkdir(path, mode),
mkdtemp: (prefix: string, options?: { encoding: string }) =>
this.providers.get("/")!.promises.mkdtemp(prefix, options),
this.processPath(prefix).promises.mkdtemp(prefix, options),
open: async (
path: string,
flags: "r" | "r+" | "w" | "w+" | "a" | "a+",
Expand Down

0 comments on commit 8df0f6d

Please sign in to comment.