Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
retorquere committed Jan 8, 2025
1 parent ec91de4 commit 1660ec7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions content/file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,10 @@ export const File = new class {
}

export const Path = new class {
#home = ''
#home: string
public get home(): string {
return (this.#home = this.#home || FileUtils.getDir('Home', []).path as string)
// dynamic fetch because this does not work in workers, but it also isn't requested there
return typeof this.#home === 'string' ? this.#home : (this.#home = FileUtils.getDir('Home', []).path as string)
}

#basenameRE = isWin ? /(^|\\)([^\\]+)\\?$/ : /(^|[/])([^/]+)[/]?$/
Expand Down

0 comments on commit 1660ec7

Please sign in to comment.