Automatic reload when the database get externally modified #56
base: master
Are you sure you want to change the base?
Conversation
When the database if modified by an other instance of KeePassX, KeePassX detect it and reload automatically the database.
Conflicts: src/gui/DatabaseWidget.cpp
Nice feature. I have my password file in dropbox, what happens if modified the file externally and locally? would it ignore my local changes and just reload the new file? |
The FileSystemWatcher class is a wrapper to QFileSystemWatcher (http://qt-project.org/doc/qt-4.8/qfilesystemwatcher.html#details). It works only on mounted file system, and I'm not sure it is works on other shared file system that NFS or Samba. Wrapping FileSystemWatcher was necessary to handle the deletion and creation of .kdbx files. If you use dropbox, your remote modifications will be ignored until you do a local update. This is what I'm supposing, but I'm not a dropbox user. |
This appears to be similar (at least in spirit) to #12. Getting one of these two merged would be most excellent. @testcocoon: What happens if the local db has been modified, but not saved, when the database on disk is changed? Does the user lose their modifications when the file is automatically reloaded? @jmena: if the file was modified locally and elsewhere via Dropbox simultaneously, it would be up to Dropbox to handle the conflict (it will choose one to rename to |
This is definitely not the same as #12 because the reload button is a manual operation. Here keepassx detect that a file is modified and reload it automatically. Actually, the user changes get lost when the databse get modified and automatically reloaded. But better would be to merge the database reloaded with the current version. Is this possible? |
#12 does not add a reload button: it automatically detects background changes, and then, depending on the settings and the status of the database (i.e. some pending modifications), will either:
|
I was reading the thread too fast.
I pick this wrapper from the testcocoon project. But since I'm the author of it, don't be worry about any copyright issues. |
This sounds like the sort of stuff you should not handle, tbh. If a tool does that, it's doing it wrong. |
This sounds like the sort of stuff you should not handle, tbh. If a tool does that, it's doing it wrong. This is a wrong assumption, some tools are processing as followings:
|
I'd like to add my +1 to get this merged in, a very valuable feature for people syncing a database across many systems (fwiw I use btsync). One little note, the setting it exposes has a spelling mistake: "... is expernally modified" <<< p instead of t |
<item row="5" column="0"> | ||
<widget class="QCheckBox" name="autoReloadOnChangeCheckBox"> | ||
<property name="text"> | ||
<string>Automatically reload when the database is expernally modified</string> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the line I meant, should be:
Automatically reload when the database is externally modified
@jleclanche Replacing an existing file with a different object rather than opening for writing and just touching the changed bits is actually a common pattern and a proper way to handle files on *nix systems. Besides the already mentioned 👍 for this or some variation thereof as a feature for KeePassX, this would be quite useful for those of us syncing password databases between systems. |
@testcocoon Understood. If they are favorable you could submit the wrapper bit as a PR to their branch to be merged prior to their PR to the upstream project being accepted. |
Does anyone know the current status of this feature, also known as issue #73? Can't wait for it to be merged into KeePass.. |
Why hasn't this been accepted yet? It's suggested since 2014 and one of the most important things??? |
Any news to this pr? |
For as far as I know, still not in progress as you can see here unfortunately :( |
This would be absolutely necessary in my opinion. People are using cloud services to sync their different devices nowadays... or so I was told. :P |
Feature: if the .kdbx database get modified by an other instance of Keepassx, Keepassx detect it and reload the database automatically.
The detection works also on network share and so permits that all user which have the same database open are not working on outdated databases.
This does not handle concurrent edition of the same .kdbx file. In this case a lock file or a merge mechanism is also necessary.