Skip to content

Commit

Permalink
Dialog: we weren't actually writing the .dir file
Browse files Browse the repository at this point in the history
  • Loading branch information
curiousdannii committed Oct 18, 2024
1 parent 53da85b commit 2e95273
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/dialog/browser/browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,11 @@ export class DialogController {
filesave_saveAs(new Blob([data]), file.name)
}

new_folder(path: string) {
async new_folder(path: string) {
// Consider making this a function of the provider, to better support providers which can store actual empty folders
const now = Date.now()
const dir_path = path + '/.dir'
this.provider.write({dir_path: new Uint8Array(0)})
await this.provider.write({[dir_path]: new Uint8Array(0)})
this.metadata[dir_path] = {
atime: now,
mtime: now,
Expand Down
2 changes: 1 addition & 1 deletion src/index-common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export * as protocol from './common/protocol.js'
export {filetype_to_extension, filters_for_usage, path_native_to_posix, path_posix_to_native} from './dialog/common/common.js'
export type {AsyncDialog, AutosaveData, ClassicFileStream, ClassicStreamingDialog, ClassicSyncDialog, Dialog, DialogDirectories, DialogOptions} from './dialog/common/interface.js'

export type {BrowserDialog, DownloadOptions} from './dialog/browser/interface.js'
export type {BrowserDialog, DownloadOptions, FileData, FilesMetadata} from './dialog/browser/interface.js'

export type {GiDispa, GlkApi, GlkApiAsync, GlkApiOptions, GlkClassName, GlkFref, GlkObject, GlkSchannel, GlkStream, GlkVM, GlkWindow} from './glkapi/interface.js'
export {AsyncGlk, RefBox, RefStruct} from './glkapi/glkapi.js'
Expand Down

0 comments on commit 2e95273

Please sign in to comment.