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

Copying file to clipboard and then removing the file cause paste to fail without proper error handling. #577

Open
lazysegtree opened this issue Jan 28, 2025 · 4 comments
Labels
bug Something isn't working

Comments

@lazysegtree
Copy link
Collaborator

lazysegtree commented Jan 28, 2025

Describe the bug
When m.pasteItems is called, it should properly handle errors if the file to copy does not exist. A failed process is probably a correct behaviour. But that NaN% should not occur. And process should not get stuck as we can see in below screenshot.

To Reproduce
Steps to reproduce the behavior:

  1. Open spf and copy a file to clipboard by Ctrl+C
  2. Rename the file
  3. It will go away from clipboard
  4. Do paste by pressing Ctrl+v
  5. You will see a stuck/failed process with NaN% as progress
    Expected behavior
    A clear and concise description of what you expected to happen.

Screenshots

Image Image Image

System information (please complete the following information):

  • OS: MacOS
  • Version 14
  • superfile Version 1.1.7.1
@lazysegtree lazysegtree added the bug Something isn't working label Jan 28, 2025
@lazysegtree
Copy link
Collaborator Author

In logs , I see

time=2025-01-28T17:14:27.356+05:30 level=INFO msg="Clipboard render function get item state error stat /Users/kuknitin/temp/_bin/aas/aas/Assets.xcassets/new.txt: no such file or directory\n"

@lazysegtree
Copy link
Collaborator Author

Error during paste

time=2025-01-28T17:15:32.005+05:30 level=DEBUG msg=model.handleKeyInput msg=ctrl+v typestr=ctrl+v runes=[] type=22 paste=false alt=false
time=2025-01-28T17:15:32.005+05:30 level=DEBUG msg="model.handleKeyInput. model info. " filePanelFocusIndex=0 filePanel.focusType=focus filePanel.panelMode=browserMode typingModal.open=false warnModal.open=false fileModel.renaming=false searchBar.focussed=false helpMenu.open=false firstTextInput=false focusPanel=nonePanelFocus
time=2025-01-28T17:15:32.005+05:30 level=ERROR msg="mode.pasteItem - Error in countFiles" error="lstat /Users/kuknitin/temp/_bin/aas/aas/Assets.xcassets/new.txt: no such file or directory"
time=2025-01-28T17:15:32.006+05:30 level=DEBUG msg=model.pasteItem items=[/Users/kuknitin/temp/_bin/aas/aas/Assets.xcassets/new.txt] cut=false totalFiles=0 "panel location"=/Users/kuknitin/temp/_bin/aas/aas/Assets.xcassets
time=2025-01-28T17:15:32.006+05:30 level=DEBUG msg="model.pasteItem - paste failure" error="lstat /Users/kuknitin/temp/_bin/aas/aas/Assets.xcassets/new.txt: no such file or directory" "current item"=/Users/kuknitin/temp/_bin/aas/aas/Assets.xcassets/new.txt errMessage="paste item error"
time=2025-01-28T17:15:32.006+05:30 level=INFO msg="paste item error lstat /Users/kuknitin/temp/_bin/aas/aas/Assets.xcassets/new.txt: no such file or directory\n"

@GRFreire
Copy link
Contributor

I can try digging into this issue later this week if no one else has already starded.

@lazysegtree
Copy link
Collaborator Author

@GRFreire I am not actively working on it. You can give it a try.

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

2 participants