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

Improve Handling of Temporary Files #5343

Open
System233 opened this issue Dec 4, 2024 · 0 comments
Open

Improve Handling of Temporary Files #5343

System233 opened this issue Dec 4, 2024 · 0 comments

Comments

@System233
Copy link

Description

When a file is a temporary file dragged and dropped into NP3 (e.g., dragging a file from 7z into NP3), and there are unsaved changes in the current window, NP3 will prompt that there are unsaved changes. After selecting "OK" or "Cancel" to dismiss the dialog, NP3 will then try to access the temporary file, which has been deleted immediately after the drag-and-drop operation. NP3 will display an error message saying the file cannot be found and remain in the "unsaved changes" state. If the user attempts to drag the file from 7z into NP3 again, NP3 will cycle through the sequence of "ask to save" → "file not found" → "nothing happens," and the file from 7z will never open.

Current Behavior

The user cannot retry opening a dragged-in temporary file. They need to manually resolve the conflict repeatedly (at least twice), which leads to a poor experience with unnecessary repeated prompts.

Expected Behavior

When NP3 receives a drag-and-drop operation and asks whether to save the file, regardless of whether the user chooses to save or discard, NP3 should close the original file and return to a state with no file open. This way, the user can retry opening the file and achieve the desired outcome.

Steps to Reproduce:

  1. Drag and drop a temporary file (e.g., from 7z) into NP3.
  2. Have unsaved changes in the current window.
  3. NP3 will ask if you want to save the file, select "OK" or "Cancel" to close the dialog.
  4. After the drag-and-drop, NP3 will try to access the now-deleted temporary file and show an error that the file cannot be found, remaining in the "unsaved changes" state.
  5. If you try to drag the file from 7z again, NP3 will loop through "ask to save" → "file not found" → "nothing happens," and the file cannot be opened.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant