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
Think about setting the auto backup feature to off for new installations #6150
Comments
Not really convinced that it is npp related. From my point of view npp could help in one of two ways preventing the user from doing the last action.
My two cents |
I didn't say that Notepad++ is "the bad guy" which causes data loss, who or what's the cause is totally unclear at the moment. But in fact that feature often leads to data loss for whatever reason, thus IMO it should not be activated by default until the bug is fixed. |
But disabling that feature and until the bug is fixed does indicate that npp is the culprit. |
Hmm, since english is not my mothertongue maybe I wasn't able to express exactly what I meant. When I talk of "fixing the bug" it is clear that the code of Notepad++ can only be improved in that sense that the changes to be done prevent a data loss. Since I think your theory about what's the cause of the data loss seems to be plausible, that means that a workaround has to be designed to prevent data loss. But until this workaround isn't implemented the auto backup feature should be disabled by default. Your suggestion 1. (the flag solution) sounds good. But it should be a per-file solution. Maybe for every auto backup file a second file should be created (working as "the flag") after the actual backup file has been written correctly. Thus, before writing to an auto backup file the flag file has to be deleted. Maybe the flag file even could contain a checksum of the backup file. This solution would allow to consider a backup file as valid if Notepad++ crashed some seconds after the last write operation to that file. And it means that after installing the update that introduces this feature there has to be run code that creates the flag files for all already existing backup files to flag them as valid. |
Yes, as npp does already track session information per file it could be added to session.xml file |
Addition: Maybe it's worth to have a look at the ReplaceFile API. This could avoid the need of a flag file. |
I think, ReplaceFile API will break hard links. |
Yes, and because of
it is not suitable anyway. |
I think a combination of my first suggestion and @dinkumoils suggestion to check per file would be the easiest and maybe most sensible solution.
|
Description of the Issue
In the community forum a lot of users are complaining about data loss due to the session feature in combination with the auto backup feature. The problem is, that noone knows how to reproduce that failure, thus the bug can not be fixed.
I would like to suggest to turn off the auto backup feature for new installations until this bug has been fixed. An unrelieable feature should not be activated by default.
Debug Information
Applies to all current versions of Notepad++
The text was updated successfully, but these errors were encountered: