Skip to content

Commit

Permalink
fix: renaming of a folder made it display as a file #929
Browse files Browse the repository at this point in the history
  • Loading branch information
rejetto committed Mar 5, 2025
1 parent 003c148 commit 2c20d9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,10 @@ export class DirEntry implements ServerDirEntry {
public readonly key?: string

constructor(n: string, rest?: any) {
Object.assign(this, rest) // we actually allow any custom property to be memorized
this.isFolder = n.endsWith('/')
if (this.isFolder)
n = n.slice(0, -1)
Object.assign(this, rest) // we actually allow any custom property to be memorized
this.n = n // must do it after 'rest' to avoid overwriting
this.uri = rest?.url || ((n[0] === '/' ? '' : location.pathname) + pathEncode(n) + (this.isFolder ? '/' : ''))
if (!this.isFolder) {
Expand Down

0 comments on commit 2c20d9a

Please sign in to comment.