Clipboard
Clipboard copied to clipboard
Cut and paste + โdon't replaceโ should not remove the original file
Describe the bug
When cb paste
and the file already exists, we can say no to stop the process. In this case, everything should be cancelled, but v0.9.0 (commit 9af03b2) removes it.
To Reproduce Steps to reproduce the behavior:
$ mkdir from && date > from/a.txt
$ mkdir to && date > to/a.txt
$ cb cut from/a.txt
โ Cut one item
$ tree
./
โโโ from/
โ โโโ a.txt
โโโ to/
โโโ a.txt
$ cd to && cb paste
โฌค The item a.txt already exists here. Do you want to replace it? Use all to replace all existing, or skip to replace nothing. [(y)es/(n)o)/(a)ll/(s)kip]
# Say โnoโ here.
$ tree ..
../
โโโ from/
โโโ to/
โโโ a.txt
Now from/a.txt
is removed.
Expected behavior
from/a.txt
should not be removed.
Screenshots
N/A
Version
CB 0.9.0 (commit 9af03b2) from scoop, Windows 10.
Questionnaire Check these boxes to see if your issue is valid or not.
- [ ] If I compiled CB, then any errors that may be present don't mention "LTO error" (this is sadly a bug with the compiler, not Clipboard)
- [ ] If I compiled CB, then any errors that may be present don't mention "XYZ has not been defined in namespace std" (this sadly means you need a compiler with C++20 support, so upgrade first)
- [ ] I check all these boxes without reading them
- [ ] I think bachata is the best music
- [x] I'm using the latest commit/release (we only support the latest)
- [ ] If I downloaded CB from GitHub Actions or with the install script, any errors that may be present don't mention "GLIBC XYZ not found" (your system is sadly too outdated for CB, so upgrade it)
Additional context Add any other context about the problem here.
For those who want to find their file back: Search the temp dir (see cb config
).