Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ tmp
/debian/tmp/
/.gocache
/.idea
.opencode
2 changes: 1 addition & 1 deletion model/vfs/directory.go
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ func TrashDir(fs VFS, olddoc *DirDoc) (*DirDoc, error) {
}

trashDirID := consts.TrashDirID
restorePath := path.Dir(oldpath)
restorePath := path.Dir(oldpath) + "/"

var newdoc *DirDoc
err = tryOrUseSuffix(olddoc.DocName, conflictFormat, func(name string) error {
Expand Down
2 changes: 1 addition & 1 deletion model/vfs/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ func TrashFile(fs VFS, olddoc *FileDoc) (*FileDoc, error) {
}

var newdoc *FileDoc
restorePath := path.Dir(oldpath)
restorePath := path.Dir(oldpath) + "/"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what will be for the files with "/" as an oldpath? I think we should keep root unchanged

err = tryOrUseSuffix(olddoc.DocName, conflictFormat, func(name string) error {
newdoc = olddoc.Clone().(*FileDoc)
newdoc.DirID = consts.TrashDirID
Expand Down
Loading