Skip to content
This repository was archived by the owner on Oct 15, 2024. It is now read-only.

Commit a0b6f48

Browse files
msfjarvisFabianHenneke
authored andcommitted
PasswordCreationActivity: properly guard rename code
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
1 parent 2c6d454 commit a0b6f48

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

app/src/main/java/com/zeapo/pwdstore/crypto/PasswordCreationActivity.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ class PasswordCreationActivity : BasePgpActivity(), OpenPgpServiceConnection.OnB
286286
}
287287
}
288288

289-
if (category.isVisible && category.isEnabled) {
289+
if (category.isVisible && category.isEnabled && oldFileName != null) {
290290
val oldFile = File("$repoPath/${oldCategory?.trim('/')}/$oldFileName.gpg")
291291
if (oldFile.path != file.path && !oldFile.delete()) {
292292
setResult(RESULT_CANCELED)

0 commit comments

Comments
 (0)