Community
    • Login

    Backup Files for New, Unsaved Tabs Are Deleted When Tab Is Closed — Bug?

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    3 Posts 3 Posters 63 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Tall Navy GuyT
      Tall Navy Guy
      last edited by

      Environment
      Notepad++: v8.6.6 (64-bit)

      OS: Windows 10 22H2

      Preferences ► Backup:

      ✓ Enable session snapshot and periodic backup (every 7 s, “Backup path” = C:\Temp\NppBackups)

      ✓ Remember current session for next launch

      ✓ Enable backup on save (simple)

      Steps to Reproduce
      Launch Notepad++.

      Press Ctrl + N to open a new tab (“new 1”).

      Type some text but do not save the file.

      Wait > 7 seconds (ensure a periodic backup is created).

      Close the “new 1” tab (mouse X or Ctrl + W).

      Inspect the backup folder.

      Expected Result
      The backup file (new 1@yyyy-MM-dd_hhmmss.txt) should remain in the backup folder so the content can be recovered later unless Settings ► Preferences ► Backup is disabled.

      Actual Result
      The backup created for the unsaved tab is immediately deleted when the tab is closed — there is no way to recover the text.

      Why This Matters
      Users (myself included) rely on the periodic-backup feature as a safety net for unsaved work. Accidentally closing an unsaved tab—or closing all tabs—should not silently discard those backups; other editors retain them until the user explicitly deletes the file or disables backups.

      Questions / Requests
      Is this behaviour by design or a regression?

      If intentional, could an option be added to retain backups for unsaved tabs after they are closed?

      Any existing workaround other than “never close an unsaved tab”?

      Thanks for any insight — and for the continued development of Notepad++!

      — Brian

      Lycan ThropeL Terry RT 2 Replies Last reply Reply Quote 0
      • Lycan ThropeL
        Lycan Thrope @Tall Navy Guy
        last edited by

        @Tall-Navy-Guy ,
        If you did not get this dialog box on your attempted closing:

        Backupworks.PNG

        You have an issue. I don’t know of any settings that can turn off warning dialogs, but if there is one, and someone else knows other than me, you’ve turned them off, if it’s possible.

        If it’s not possible to turn off dialog warnings, you have a problem installation. Suggest you uninstall and/or reinstall Notepad++, to see if that fixes the problem.

        If it doesn’t, and there is an .ini setting that allows these to be turned off, you may have to erase that before reinstalling, so it will be written new with no settings that can kill the dialog warning screens.

        1 Reply Last reply Reply Quote 2
        • Terry RT
          Terry R @Tall Navy Guy
          last edited by Terry R

          @Tall-Navy-Guy said in Backup Files for New, Unsaved Tabs Are Deleted When Tab Is Closed — Bug?:

          Actual Result
          The backup created for the unsaved tab is immediately deleted when the tab is closed — there is no way to recover the text.

          Why This Matters
          Users (myself included) rely on the periodic-backup feature as a safety net for unsaved work. Accidentally closing an unsaved tab—or closing all tabs—should not silently discard those backups; other editors retain them until the user explicitly deletes the file or disables backups.

          You really need to understand what the backup is designed to do. There is a FAQ section and in there is this post which explains in detail what it does.

          You say you rely on this process “as a safety net” yet what you really seem to say is that this will be the “one and only” copy of the data you create. I am actually concerned to learn that you are relying on some process which clearly you misunderstand for saving what seems to be critical data.

          I believe you should get a message when closing the new 1 tab (not the whole application) asking if you want to keep it (see image in @Lycan-Thrope post), so in reality the application does NOT silently discard the backup, it asks you, it seems you confirm you don’t want the data since you are asking this question. The only “silent” process will be if you close Notepad++ without first closing any tabs. When you start Notepad++ later, all tabs should remain with their content intact.

          For your idea to work you would continue to rack up endless “backup” files, all with the same starting name new 1... and have very little idea which file contains which data you want.

          If you were to search this forum you will find it littered with unhappy users who like you misunderstood the process, relied on it for their only copy, only to find that inevitably the process eventually failed them, often due to external factors outside of Notepad++'s control.

          Please read the FAQ post and I strongly suggest changing the way you use Notepad++.

          Terry

          1 Reply Last reply Reply Quote 4
          • First post
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors