Community
    • Login

    [BUG] Updating removes my doLocalConf.xml every time

    Scheduled Pinned Locked Moved Boycott Notepad++
    6 Posts 3 Posters 6.4k Views 2 Watching
    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 Offline
      awksie
      last edited by

      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.

      mpheathM 1 Reply Last reply Reply Quote 1
      • mpheathM Offline
        mpheath @awksie
        last edited by

        @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 Reply Quote 1
        • A Offline
          awksie @mpheath
          last edited by awksie

          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!

          mpheathM 1 Reply Last reply Reply Quote 0
          • mpheathM Offline
            mpheath @awksie
            last edited by mpheath

            @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.

            xomxX 1 Reply Last reply Reply Quote 2
            • xomxX Offline
              xomx @mpheath
              last edited by

              @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.

              xomxX 1 Reply Last reply Reply Quote 2
              • xomxX Offline
                xomx @xomx
                last edited by

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

                1 Reply Last reply Reply Quote 1

                Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                With your input, this post could be even better 💗

                Register Login
                • First post
                  Last post
                The Community of users of the Notepad++ text editor.
                Powered by NodeBB | Contributors