Skip to content

Commit

Permalink
Fixes to XML, renamed a file (casing)
Browse files Browse the repository at this point in the history
  • Loading branch information
james-pre committed Dec 10, 2024
1 parent 2c65ddb commit c7d2381
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export * from './access.js';
export * from './IndexedDB.js';
export * from './Storage.js';
export * from './storage.js';
export * from './xml.js';
File renamed without changes.
7 changes: 4 additions & 3 deletions src/xml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export class XMLFS extends Sync(FileSystem) {
}

public statSync(path: string): Stats {
return get_stats(this.get(path, 'stat'));
return get_stats(this.get('stat', path));
}

public openFileSync(path: string, flag: string): File {
Expand Down Expand Up @@ -106,7 +106,8 @@ export class XMLFS extends Sync(FileSystem) {
}

public mkdirSync(path: string, mode: number): void {
this.create('mkdir', path, { mode: mode | S_IFDIR });
const node = this.create('mkdir', path, { mode: mode | S_IFDIR });
node.textContent = '[]';
}

public readdirSync(path: string): string[] {
Expand Down Expand Up @@ -147,7 +148,7 @@ export class XMLFS extends Sync(FileSystem) {
const node = this.document.createElement('file');
node.setAttribute('paths', JSON.stringify([path]));
set_stats(node, stats);
this.document.append(node);
this.document.documentElement.append(node);
return node;
}
}
Expand Down

0 comments on commit c7d2381

Please sign in to comment.