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

Commit

Permalink
Merge pull request #73 from chenminjian/fix/same-file
Browse files Browse the repository at this point in the history
fix: not remove file by mistakes
  • Loading branch information
Stebalien authored Mar 26, 2019
2 parents 198fe2d + 9fe9f96 commit 30aee5f
Showing 1 changed file with 4 additions and 0 deletions.
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 srcDir == dstDirStr && srcFname == filename {
return nil
}

return srcDirObj.Unlink(srcFname)
}

Expand Down

0 comments on commit 30aee5f

Please sign in to comment.