After updating to Notepad++ 6.7.4, it asked to update the plugin manager to version ~1.3 or something. The update failed various time (with N++ being started in Administrator mode) and then left me with a "blank" configuration.
Thanks to the new "snapshot" feature I had unsaved files and modifications. How can I recover them ?
( Also reported here by someone else: https://portableapps.com/news/2015-01-21--notepadpp-portable-6.7.4-released )
Thanks & Great work !
Edward
I found where the snapshots were stored (and the old ones are still there):
...\Notepad++Portable\App\Notepad++\backup\
and where the editor state is stored - these were the files somehow lost during the update:
...\Notepad++Portable\App\Notepad++\config.xml
(recent file history)...\Notepad++Portable\App\Notepad++\session.xml
(opened files and edited files pointer to snapshot name)Still wondering:
IIUC, the only way to force the config directory is with doLocalConf.xml ; so there's not way to actually make it PortableApps-compliant ?
My update experience parallels yours. My concern was the loss of the style configurations that I had previously set up. These were primarily the color syntax settings for .c and .h software files. After the update, everyting got set back to the defaults. So far I have not found where this configuration information is stored.
The only way that config.xml and stylers.xml get left in Notepad++Portable\App\Notepad++ is if you improperly exit the app... aka turn off the PC, pull the drive, or shutdown Windows without closing the app... all of which have the exact same effect. However, even if that happens, the files will be recovered on next run as it realizes it was crashed instead of closed.
It gets more complicated if you crash Notepad++ Portable doing one of the above behaviors (turn off PC, pull drive, shutdown Windows without closing apps) and then upgrade the app before running it and allowing it to clean up and close properly. Even in that case, though, the app is set not to remove the App directory on an upgrade. So, your files would still be preserved within App\Notepad++.
The only issue I foresee is if you crash the app, upgrade without letting it cleanup/close properly, and then it can't figure out what happened.
The best way to ensure none of this happens is to properly close the app. The best way to ensure you do that is to use the PortableApps.com Platform which will ensure it properly closes and alert you if any apps are still running when you close it down.
Sometimes, the impossible can become possible, if you're awesome!
I think that the real problem that e6war6 and I have seen is that after the most recent upgrade, the first time that the program is run a box pops up indicating that the plugin manager needs to be updated. If you say yes to that change you lose your configuration information. I don't think this is an issue with imporper shutdown. I experienced the problem on several flash drives.
I think adding this to the [Launch] section of Notepad++Portable.ini may alleviate that. You can give this a try if you'd like:
WaitForEXE1=gpup.exe
I'll push out an update as soon as we confirm that this handles it.
I didn't think anyone used the updater since it requires admin rights which is a no no in portable land.
Sometimes, the impossible can become possible, if you're awesome!
I made a bup of my N++P dir
installed N++P as new
edited Notepad++Portable.ini as above
ran it and accepted the updates OK
cp Old Data/Config/session.xml and config.xml over to new
which seems OK
can't seem to get my plugins and settings for them back
Bindlestiff: I don't use styles so wouldn't know what to copy over
e6war6: my \App\Notepad++\ stuff was already on bup, do you have good files in the same locations as me above ?
John: am I even going about this the right way?
Wm
g'night all, I'll try again in the morning UK time
Wm
It turns out it's due to Notepad++'s plugin updater when it updates itself. notepad++ isn't running anymore but the plugin updater is and the launcher closes thinking notepad++ is done running. Rev 2 I just posted handles this use case.
Unfortunately, there is another issue. Notepad++'s plugin updater is broken and always asks for admin rights even when running portably, when it does not need them and should not switch security levels. By switching security levels, the Notepad++ launcher can sometimes not tell that gpup.exe is running, since it is running in another context. In the future, we may simply remove gpup.exe since most users wouldn't be able to use it portably anyway due to the broken admin UAC prompting. This would only affect the plugin manager updating itself.
It won't need to update in Rev 2 as we've included the most recent revision of the plugin updater.
Sometimes, the impossible can become possible, if you're awesome!