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

Deleted ctx-File after "Save as" dialog #2504

Closed
DarthtidusX opened this issue May 7, 2024 · 7 comments
Closed

Deleted ctx-File after "Save as" dialog #2504

DarthtidusX opened this issue May 7, 2024 · 7 comments

Comments

@DarthtidusX
Copy link

Version 1.1.2, Operative system Windows 11 Enterprise
State the Version and the Operative System/Desktop. Try the latest available version before reporting an issue.

Describe the bug
When I tried to save my content via "save as" dialog I become an error --> see picture.

The old file were delete but the new file not created.

To Reproduce
If applicable, attach a non-personal document where the issue can be reproduced systematically.
Steps to reproduce the behavior:

  1. Go to File.'
  2. Click on 'Save as'
  3. Click on 'Single SQLite File, 7-zip Encrypted and Password Protected (.ctx)'
  4. Set new Password
  5. Save to network storage
  6. Delete old File
  7. Get the Error !! sqlite3 .... table node already exists

Screenshots

cherrytreeBug

@giuspen
Copy link
Owner

giuspen commented May 7, 2024

You did file--save_as of a .ctx choosing the exact same file path/name of the existing document you are currently saving, and that causes the issue, is that correct?
I will try to reproduce and get back.

@DarthtidusX
Copy link
Author

Hi,

yes that's the issue.
Okay, let me know If you have news.
Thank you.

@giuspen
Copy link
Owner

giuspen commented May 7, 2024

I see it, thanks for reporting I will come back with a fix shortly

[2024-05-07 22:07:54.558] [   ] [error] fs::remove: g_remove failed to remove C:\msys64\tmp\.9JB2M2\bug2.ctb
[2024-05-07 22:07:54.559] [   ] [error] fs::remove: g_remove failed to remove C:\msys64\tmp\.9JB2M2\bug2.ctb
[2024-05-07 22:07:54.559] [   ] [error] !! sqlite3 'CREATE TABLE node (node_id INTEGER UNIQUE,name TEXT,txt TEXT,syntax TEXT,tags TEXT,is_ro INTEGER,is_richtxt INTEGER,has_codebox INTEGER,has_table INTEGER,has_image INTEGER,level INTEGER,ts_creation INTEGER,ts_lastsave INTEGER)': table node already exists

@DarthtidusX
Copy link
Author

No Problem.
Thank you.

giuspen added a commit that referenced this issue May 10, 2024
@giuspen
Copy link
Owner

giuspen commented May 10, 2024

Thanks again for reporting.
I have now added checks and a warning dialog preventing a 'Save As' or 'Export' resulting in the overwrite of the currently open document.
Running 'Save' is the only supported way to update the open document in place.

@giuspen giuspen closed this as completed May 10, 2024
@DarthtidusX
Copy link
Author

Oh nice.
Thanks for fixing the issue.
Have a nice weekend.

@giuspen
Copy link
Owner

giuspen commented May 10, 2024

Have a good weekend ;)

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

2 participants