Skip to content

Commit

Permalink
Removed permission checking
Browse files Browse the repository at this point in the history
Updated core and utilium
  • Loading branch information
james-pre committed Sep 19, 2024
1 parent d05044f commit 4a04dfd
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 32 deletions.
57 changes: 32 additions & 25 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@
"typescript": "5.2.2"
},
"peerDependencies": {
"@zenfs/core": "~0.11.2"
"@zenfs/core": ">=0.18.0"
},
"dependencies": {
"utilium": "^0.3.4"
"utilium": ">=0.4.0"
}
}
9 changes: 4 additions & 5 deletions src/backend.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import type { Backend } from '@zenfs/core';
import { Cred } from '@zenfs/core/cred.js';
import { Sync, type Backend } from '@zenfs/core';
import { basename, dirname } from '@zenfs/core/emulation/path.js';
import { Errno, ErrnoError, errorMessages } from '@zenfs/core/error.js';
import { File } from '@zenfs/core/file.js';
import { FileSystem, FileSystemMetadata, Sync } from '@zenfs/core/filesystem.js';
import { FileSystem, FileSystemMetadata } from '@zenfs/core/filesystem.js';
import { FileType, Stats } from '@zenfs/core/stats.js';
import { Buffer } from 'buffer';

Expand Down Expand Up @@ -158,11 +157,11 @@ export class EmscriptenFS extends Sync(FileSystem) {
}
}

public renameSync(oldPath: string, newPath: string, cred: Cred): void {
public renameSync(oldPath: string, newPath: string): void {
try {
this.em.rename(oldPath, newPath);
} catch (e) {
throw convertError(e, e.errno != Errno.ENOENT ? '' : this.existsSync(oldPath, cred) ? newPath : oldPath);
throw convertError(e, e.errno != Errno.ENOENT ? '' : this.existsSync(oldPath) ? newPath : oldPath);
}
}

Expand Down

0 comments on commit 4a04dfd

Please sign in to comment.