Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cut and paste + “don't replace” should not remove the original file #192

Open
1 of 6 tasks
YDX-2147483647 opened this issue May 10, 2024 · 0 comments
Open
1 of 6 tasks
Labels
bug Something isn't working

Comments

@YDX-2147483647
Copy link

YDX-2147483647 commented May 10, 2024

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
  • 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).

@YDX-2147483647 YDX-2147483647 added the bug Something isn't working label May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant