Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save a copy to results in empty file with read only mode #1666

Closed
cbiere opened this issue Oct 15, 2023 · 7 comments
Closed

Save a copy to results in empty file with read only mode #1666

cbiere opened this issue Oct 15, 2023 · 7 comments

Comments

@cbiere
Copy link

cbiere commented Oct 15, 2023

Using the built-in function "Save a copy to" to create a copy of the database results in an empty file regardless what storage is used ( internal or SDHX card). I tried with two different databases.

Steps to reproduce the behavior:

  1. Unloock a KDBX file with KeePassDX
  2. Tap on the three line menu in the upper left
  3. Tap on save a copy to and pick whatever folder.
  4. Lock the database and inspect the newly created KDBX file: it's zero bytes.

I expected KeePassDX to create an identical copy of the database just like copying the file with a file manager.

KeePass Database

  • Created with: KeePassDX or KeePass 2.x on Windows
  • Version: 2 KDBX 4.0
  • Location: internal storage: /storage/emulated/0
  • File provider (content:// URI): content://com.android.externalstorage.documents/document/primary:KeePass/KeePass-Database.kdbx
  • Size: 663 kB
  • Contains attachment: very few

KeePassDX:
com.kunzisoft.keepass.free
Installed: 12 Oct 2023; 11:30
Installed from Google Play Store

  • Version: 4.0.2
  • Build: Free
  • Language: English

Android:

  • Device: Redmi Note 10 Pro (sweet)
  • Version: Android 13 (SparkOS)
@cbiere cbiere added the bug label Oct 15, 2023
@risuello
Copy link

I had a similar bug or something like this

@J-Jamet
Copy link
Member

J-Jamet commented Oct 28, 2023

I just tested on several devices and I have no problems. Does it work with a new database?

@J-Jamet
Copy link
Member

J-Jamet commented Oct 28, 2023

Several people have also reported the problem to me and have Xiaomi (you are not afraid to choose this type of equipment :D)

Linked to : #1620

@cbiere
Copy link
Author

cbiere commented Oct 28, 2023

A new database makes no difference. I can also export attachments from my database. So there's no general problem for KeePass writing files or with specific folders. It's just the Save a copy function that fails. I looked at logs with logfox but couldn't find anything that seemed relevant to me.

@cbiere
Copy link
Author

cbiere commented Oct 28, 2023

I found out what's causing this: My KeePassDX settings are set so that database are opened in read-only mode by default. Interestingly this is what prevents the copy function from working. It doesn't prevent creating a new vault though. I still think of this as a bug especially as there's no warning but the workaround is simple once you know about it: Open the database in writable mode.

@J-Jamet
Copy link
Member

J-Jamet commented Oct 29, 2023

Hoo I see. This is indeed a bug that needs to be fixed. I'll take care of it and make it a priority.

@J-Jamet J-Jamet changed the title Save a copy to results in empty file Save a copy to results in empty file with read only mode Oct 29, 2023
@J-Jamet
Copy link
Member

J-Jamet commented Oct 29, 2023

Fixed in develop : 7198fff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Development

No branches or pull requests

3 participants