You are here

[Fixed] Password Safe Portable last safe not saved

7 posts / 0 new
Last post
Swwright
Offline
Last seen: 4 months 3 weeks ago
Joined: 2008-07-17 20:25
[Fixed] Password Safe Portable last safe not saved

I upgraded to version 1.40 using the automatic update feature of PortableApps. I don't use it every day, so it was a couple of days before I discovered this trouble.

When I open Password Safe Portable, it used to show me the last safe it opened, and I just had to type in my key to unlock the safe.

Now, it shows me nothing. Each time I start Password Safe, it is as if it has never run before. The list of recently-opened safes is empty. So I navigate to where my safe is, select it, type my key, save it, close Password Safe Portable. Next time I open it . . . empty list of safes.

I looked through the various config files, and I found two that contained pathnames. Here are the two files, with partial contents.

---------------------------------------------------------------------------------------
PA.c\PortableApps\PasswordSafePortable\Data\config\pwsafe.cfg
---------------------------------------------------------------------------------------
<PasswordSafePortable>
<PasswordSafePortable>
<Preferences>
<currentfile>C:\Users\MyName\Documents\pwsafe3.psafe3</currentfile>
</Preferences>
<MRU>
<Safe01>C:\Users\MyName\Documents\pwsafe3.psafe3</Safe01>
<Safe02>C:\Users\MyName\Documents\pwsafe2.psafe3</Safe02>
<Safe03>C:\Users\MyName\Documents\pwsafe.psafe3</Safe03>
</MRU>
</PasswordSafePortable>
</PasswordSafePortable>

<NAME-OF-MY-PC>
<MyName>
<MRU>
<Safe01>C:\PA.c\PortableApps\PasswordSafePortable\Data\PortableSafes\pwsafe3.psafe3</Safe01>
</MRU>
</MyName>
</NAME-OF-MY-PC>
---------------------------------------------------------------------------------------

-------------------------------------------------------------------------------------------------------------------------
PA.c\PortableApps\PasswordSafePortable\Data\settings\PasswordSafePortableSettings.ini
-------------------------------------------------------------------------------------------------------------------------
[PasswordSafePortableSettings]
LastDocumentsDirectory=C:\Users\MyName\Documents
LastDrive=C:
LastDirectory=\PA.c\PortableApps\PasswordSafePortable
[PortableApps.comLauncherLastRunEnvironment]
PAL:LastPortableAppsBaseDir=C:\PA.c
-------------------------------------------------------------------------------------------------------------------------

Wherever I found "Users\MyName\Documents", I changed it to "PA.c\PortableApps\PasswordSafePortable". If the element listed the password safe, I specified the full path, "C:\PA.c\PortableApps\PasswordSafePortable\Data\PortableSafes\pwsafe3.psafe3".

I saved the config files, and started Password Safe Portable again. It again came up with a completely empty list of safes. I closed the app. I looked at the config files again. The paths had been changed back!! Those that I changed, were again pointing to "C:\Users\MyName\Documents"!!

Why does it do this? How do I get it to STOP doing this?

Thanks!

kw2p
Offline
Last seen: 4 years 3 weeks ago
Joined: 2016-10-28 08:17
passwordsafe portable ver 3.4 Password Safe configuration

Copy the file pwsafe.cfg located in the directory: PortableApps\PasswordSafePortable\Data\Config to the directory PortableApps\PasswordSafePortable\App\PasswordSafe then it works ok. I don't know if further updates will require this repeated.
Copied from the help file:
"Migrate Password Safe configuration to user directory
Prior to version 3.22, Password Safe kept application preferences (such as some of the user options, last files opened, window size and location, etc.) in a file in the same directory as the Password Safe executable. This has caused problems with recent versions of Windows when users were not given write access to this directory. Therefore, as of version 3.22, the configuration file (pwsafe.cfg) will be created in the standard location for such files (in the user's 'Application Data' directory).

By default, upgrades to existing installations will not change the existing preference file ("if it ain't broke, don't fix it"). However, if a user wishes to switch to the new setting manually, selecting this checkbox and clicking on 'Apply' will do so.

In more detail: The configuration file is designed to support multiple users from multiple machines. The migration function will move the current user's settings (associated with the current PC) from the configuration file to the new location. If there are other user/machine specific configurations in the file, they will be left untouched. If, on the other hand, there are none left after migration, the empty file will be deleted.

If you wish to share a common configuration file between users and/or across different PCs, you can either keep the file in the executable directory, or specify its location explicitly using the '-g config-file' option, as described in command line arguments."

Gord Caswell
Gord Caswell's picture
Offline
Last seen: 4 months 1 week ago
DeveloperModerator
Joined: 2008-07-24 18:46
Already in use

We're already using the -g command line option to specify the location of the config file.

With that said, I think I can see where the problem is.

[EDIT] It appears we need to change the main currentfile value to point to the last used database in PortableSafes rather than %DOCUMENTS%

[EDIT 2] I've marked this as a bug, and will continue working on it.

Gord Caswell
Gord Caswell's picture
Offline
Last seen: 4 months 1 week ago
DeveloperModerator
Joined: 2008-07-24 18:46
Multiple issues

There are multiple issues at play here.

Firstly, we are currently setting the Documents directory manually, I anticipate this will not be neccessary on the next base app update.

Secondly, there is a bug in the application itself where the -h and -u commandline arguments are being ignored. This is set to be fixed in the next version. https://sourceforge.net/p/passwordsafe/bugs/1367/

Lastly, we are not linking to the last safe on the commandline. I am planning to rectify this when the next release of the base app occurs. For now, add the path to your safe, in double quotes, to the line "CommandLineArguments" in X:\PortableApps\PasswordSafePortable\App\Launcher\PasswordSafePortable.ini, as well as remove the quotes from the user and hostnames

It should read as CommandLineArguments=-g "%PAL:DataDir%\config\pwsafe.cfg" -u PasswordSafePortable -h PasswordSafePortable "%PAL:DataDir%\PortableSafes\pwsafe.psafe3"

If, after doing that, you're still having the same problem, delete the section [FileWrite5]

John T. Haller
John T. Haller's picture
Online
Last seen: 4 min 9 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Base app bug fixed

The bug in the base app has been fixed, so this issue is resolved with Password Safe Portable 3.42.1

Sometimes, the impossible can become possible, if you're awesome!

Swwright
Offline
Last seen: 4 months 3 weeks ago
Joined: 2008-07-17 20:25
Bug fix confirmed -- THANKS!

A note for anyone else with this problem: The first time I started the new Password Safe, it complained that it could not find my safe at "C:\Users\<MY-NAME>\<mumble-forgot-to-write-down-this-part>\<NAME-OF-MY-SAFE>". I clicked the "Search" button, and it opened a file-open dialog showing <PATH-TO-PORTABLE-APPS>\PasswordSafePortable\Data\PortableSafes. I selected my safe and opened it. Then I quit Password Safe, started it again, and it worked correctly: found the safe itself and asked for my password.

I suspect you will see the same behavior, so don't be put off by the one-time bit of confusion. It's just Password Safe cleaning up after itself.

Thanks again, Mr. Haller!

John T. Haller
John T. Haller's picture
Online
Last seen: 4 min 9 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Developer

Please thank the developer for the bug fix. We just tracked it and kept our users informed. They fixed it. Smile

Sometimes, the impossible can become possible, if you're awesome!

Log in or register to post comments