fork/gdu

git clone https://git.julia.blue/fork/gdu

cosmolifeat: move items to XDG trash with D key (#12) (#608)9ca5c60

subvolume
279 B14 linesraw
1//go:build !windows && !linux && !darwin
2
3package remove
4
5import "os"
6
7func renameNoReplace(oldpath, newpath string) error {
8	if _, err := os.Lstat(newpath); err == nil {
9		return os.ErrExist
10	} else if !os.IsNotExist(err) {
11		return err
12	}
13	return os.Rename(oldpath, newpath)
14}