• Login
Community
  • Login

[BUG] Updating removes my doLocalConf.xml every time

Scheduled Pinned Locked Moved Boycott Notepad++
6 Posts 3 Posters 432 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.
  • A
    awksie
    last edited by Feb 25, 2025, 6:57 AM

    Hello! Long-time user, first-time poster.
    I just updated to 8.7.5 after being prompted to do so. As usual, updating nuked my doLocalConf.xml file, causing me to “lose” my session and all configurations. After re-creating the file yet again, everything is back to normal. Why is the updater nuking that file, though? This has happened for the last several updates, and it caused me quite a panic the first time.

    Possibly-useful information:
    OS: Windows 11 Pro for Workstations 24H2
    UAC: Disabled
    NPP install location: D:\RandomApps\Notepad++ (this NPP install predates this Windows install by more than a decade, going back at least to Windows 8.1 if not earlier)
    The issue occurs whether I click “OK” or “OK (Silent)” when updating.

    M 1 Reply Last reply Feb 25, 2025, 4:35 PM Reply Quote 1
    • M
      mpheath @awksie
      last edited by Feb 25, 2025, 4:35 PM

      @awksie

      It is the silent install that does not show the extra options page, so $noUserDataChecked is not set to ${BST_CHECKED}. See FAQ about creating a bug report.

      Tested this code in the function setPathAndOptions before $noUserDataChecked is compared which seems to solve the doLocalConf.xml from being deleted when silently installed.

      	IfSilent 0 +3
      		IfFileExists $INSTDIR\doLocalConf.xml 0 +2
      			StrCpy $noUserDataChecked ${BST_CHECKED}
      

      @xomx Can you test and do a fix?

      A 1 Reply Last reply Feb 26, 2025, 3:57 AM Reply Quote 1
      • A
        awksie @mpheath
        last edited by awksie Feb 26, 2025, 3:59 AM Feb 26, 2025, 3:57 AM

        Oh, I’m glad it is an actual bug, although I’m positive it also happened without clicking “OK (Silent)”.

        But maybe I’m just old, hehe. ᓚᘏᗢ

        Should I create an issue on Github now or were you just telling me for future reference?

        Also, when does it ever make sense to remove a user configuration? Haha.
        That’s very strange to me that such a function would even be programmed into the installer. It’s like if you updated a game and it reset all of your settings. How odd!

        M 1 Reply Last reply Feb 26, 2025, 4:35 AM Reply Quote 0
        • M
          mpheath @awksie
          last edited by mpheath Feb 26, 2025, 4:37 AM Feb 26, 2025, 4:35 AM

          @awksie said in [BUG] Updating removes my doLocalConf.xml every time:

          Oh, I’m glad it is an actual bug, although I’m positive it also happened without clicking “OK (Silent)”.

          Graphical install shows the checkbox checked if doLocalConf.xml exists and that sets $noUserDataChecked with a checked value. If installed in %ProgramFiles%, then the checkbox might show as disabled to avoid a portable install there. The bug I found was with silent install for the reasons I mentioned previously.

          Should I create an issue on Github now or were you just telling me for future reference?

          A fix by Pull Request needs an issue to be posted. So the sooner the issue is created, then the sooner a fix can be submitted.

          Also, when does it ever make sense to remove a user configuration? Haha.

          Usually installers do not undo though this one does with this file.

          https://github.com/notepad-plus-plus/notepad-plus-plus/blob/aecc0e4a3b5a1e6717d3bec36db9df2318179f77/PowerEditor/installer/nsisInclude/mainSectionFuncs.nsh#L49-L50

          		IfFileExists $INSTDIR\doLocalConf.xml 0 +2
          		Delete $INSTDIR\doLocalConf.xml
          

          That bit of code is 9 years old as blame shows. The bug with silent install was probably not noticed until the “OK (Silent)” option was added recently.

          That’s very strange to me that such a function would even be programmed into the installer. It’s like if you updated a game and it reset all of your settings. How odd!

          Yeah. Concerning if it messes up the saved session in the process. So glad that you recovered from the event.

          X 1 Reply Last reply Feb 26, 2025, 4:48 PM Reply Quote 2
          • X
            xomx @mpheath
            last edited by Feb 26, 2025, 4:48 PM

            @mpheath said in [BUG] Updating removes my doLocalConf.xml every time:

            The bug with silent install was probably not noticed until the “OK (Silent)” option was added recently.

            Exactly.

            @mpheath said in [BUG] Updating removes my doLocalConf.xml every time:

            @xomx Can you test and do a fix?

            I’ll try tomorrow.

            X 1 Reply Last reply Feb 27, 2025, 12:11 PM Reply Quote 2
            • X
              xomx @xomx
              last edited by Feb 27, 2025, 12:11 PM

              https://github.com/notepad-plus-plus/notepad-plus-plus/issues/16233

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