qutterr / keepassdroid

Automatically exported from code.google.com/p/keepassdroid
0 stars 0 forks source link

encdroid doesnt recieve file changed/closed events from keepassdroid,so doesnt sync back keepassdroid modified database. #584

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.open a keepass database placed in encdroid container 
2.make some changes to database and close it
3.encdroid doesnot get notifeid of the file changed notification that it 
listens to( encdroid recieves the correct notification when other files like 
normal text file are edited on a text editor on android).

What is the expected output? What do you see instead?
encdroid getting notified of the file changes,and it syncs back the modified 
file to the encfs container.

What version of the product are you using? On what operating system?
android 4.3 ,latest version of keepassdroid on the play store.

Please provide any additional information below.

This bug might be either with keepassdroid or encdroid. 
Encdroid dev has already reproduced this bug:
https://github.com/mrpdaemon/encdroid/issues/35

So please have a look if keepasssdroid might not be doing the right thing by 
sending notification of the file being changed to other apps that might listen 
to such events?

Thanks.

Original issue reported on code.google.com by ashishs...@gmail.com on 22 Aug 2013 at 5:09

GoogleCodeExporter commented 8 years ago
i have debugged a bit more.. and the issue is the way keepassdroid opens up the 
database for editing.. i used a small fileobserver app to have a look what 
keepass isdoing behind the scenes.. it firsts opens the orig kdbx db,then once 
it authenticates.. it creates a temporary database and opens it for 
modification purposes.. so it does the changes on a temporary db,then it 
removes the orig db (once temporary save is successfull i guess) then renames 
it to the original file's name.
So meanwhile since Encdroid was observing the original file ,that was actually 
deleted by now once the db is saved successfully..so the fileobserver's link 
gets broken while saving the temporary db to the original db.
So encdroid cant do anything in this i guess.. and until the way keepassdroid 
works doesnt change,i guess using a fileobserver in encdroid wont solve the 
purpose.
I dont where this issue goes from here.. :(

Original comment by ashishs...@gmail.com on 25 Aug 2013 at 4:08