Skip to content
This repository has been archived by the owner on Jun 26, 2023. It is now read-only.

fix: not remove file by mistakes #73

Merged
merged 2 commits into from
Mar 26, 2019
Merged
Changes from 1 commit
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
4 changes: 4 additions & 0 deletions ops.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ func Mv(r *Root, src, dst string) error {
return err
}

if srcDirObj == dstDir && srcFname == filename {
qiwaa marked this conversation as resolved.
Show resolved Hide resolved
return nil
}

return srcDirObj.Unlink(srcFname)
}

Expand Down