Skip to content

Commit

Permalink
Forcibly remove if symlink
Browse files Browse the repository at this point in the history
(temporary solution)

- Fix #5
  • Loading branch information
babarot committed Oct 21, 2016
1 parent 5d66095 commit 527cbad
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ui.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,13 @@ func Remove(path string) (trashcan string, err error) {
return
}
} else {
// Check if symlink
fi, _ := os.Lstat(path)
if fi.Mode()&os.ModeSymlink == os.ModeSymlink {
// Forcibly remove that
os.Remove(path)
return
}
err = fmt.Errorf("%s: no such file or directory", path)
return
}
Expand Down

0 comments on commit 527cbad

Please sign in to comment.