Renaming a locked folder silently removes its lock
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 76/100
Línea de trabajo
Empieza con renameDir en app/src/main/kotlin/org/fossify/gallery/adapters/DirectoryAdapter.kt y los helpers de preferencias de protección de carpetas en BaseConfig.kt (líneas 207–225). Sigue cómo el cambio de nombre de una sola carpeta actualiza su ruta y luego comprueba cómo el cambio de nombre de varias carpetas gestiona las carpetas protegidas. Se considera terminado cuando cambiar el nombre de una carpeta protegida conserva su bloqueo en la nueva ruta y la ruta anterior deja de tener esa protección.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Checklist
- I can reproduce the bug with the latest version given here.
- I made sure that there are no existing issues - open or closed - to which I could contribute my information.
- I made sure that there are no existing discussions - open or closed - to which I could contribute my information.
- I have read the FAQs inside the app (Menu -> About -> FAQs) and my problem isn't listed.
- I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise.
- This issue contains only one bug.
- I have read and understood the contribution guidelines.
Affected app version
1.14.0
Affected Android/Custom ROM version
Android 16
Affected device model
Xiaomi 17 pro max
How did you install the app?
F-Droid / IzzyOnDroid
Steps to reproduce the bug
- Have a folder
Pictures/Secretwith one image. - Long-press the folder → ⋮ → Lock folder → OK → PIN tab → enter
1234twice. The folder now shows the lock icon, and opening it asks for the PIN. - Long-press the folder → ⋮ → Rename. The app asks for the PIN; enter it. Rename the folder to
Secret2→ OK. - Force-stop the app, open it again and tap
Secret2.
Expected behavior
The renamed folder is still locked: it shows the lock icon and asks for the PIN.
Actual behavior
The lock icon is gone and Secret2 opens without asking for the PIN (also after restarting the app).
If the folder is renamed back to Secret, the lock icon comes back, so the lock is still stored under the old folder path.
Screenshots/Screen recordings
No response
Additional information
The lock is stored in preferences keyed by the folder path (protected_folder_hash_<path> / protected_folder_type_<path>):
https://github.com/FossifyOrg/Commons/blob/227e7d3cdea2343679eb0863bb597fc7a9200b4d/commons/src/main/kotlin/org/fossify/commons/helpers/BaseConfig.kt#L207-L225
The single-folder rename asks for the PIN, then updates the Directory item and its DB row, but does not move the lock to the new path:
https://github.com/FossifyOrg/Gallery/blob/ea7499d425c583c960566ffa9f05b7dfaedd30f1/app/src/main/kotlin/org/fossify/gallery/adapters/DirectoryAdapter.kt#L309-L338
The multi-folder rename in the same function skips protected folders (!config.isFolderProtected(it), L342), so a rename is clearly not meant to drop the lock. And since the rename happens inside Gallery, the app knows the old and new path; for file renames it already moves the path-keyed media and favorites rows (updateDBMediaPath):
https://github.com/FossifyOrg/Gallery/blob/ea7499d425c583c960566ffa9f05b7dfaedd30f1/app/src/main/kotlin/org/fossify/gallery/extensions/Context.kt#L1033-L1041
Possible fix: in renameDir, if the old path is protected, call addFolderProtection(newPath, hash, type) with the old values and removeFolderProtection(oldPath).
- Lenguaje dominante
- Kotlin
- Estrellas
- 3.8k
- Forks
- 270
- Merge medio
- 1 d 7 h
- PR fusionados (30 d)
- 13
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de FossifyOrg/Gallery
-
bug needs triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
FossifyOrg/Gallery#1196 ·
Los mantenedores suelen responder en 1 día
-
bug needs triage
Dificultad 2/5 Medio día Aptitud para principiantes 60/100
FossifyOrg/Gallery#1181 ·
Los mantenedores suelen responder en 1 día
-
Failed to load updated m-timeAbiertobug needs triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
FossifyOrg/Gallery#1167 ·
Los mantenedores suelen responder en 1 día
-
Instead of the trash symbol on the main page with folders, add a delete option to the dropdown menu.Abiertofeature request needs triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
FossifyOrg/Gallery#1165 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
feature request needs triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
FossifyOrg/Gallery#1153 ·
Los mantenedores suelen responder en 1 día
Todos los issues de FossifyOrg/Gallery
Issues similares
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
react/react-native#59693 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
pengchujin/aerial-tv#989 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
[Submission] ViaAbiertosubmit-adaption submit-adaption-violation
Dificultad 1/5 Menos de una hora Aptitud para principiantes 78/100
BetterAndroid/android-notification-icon-project#811 · 2 comentarios ·
Los mantenedores suelen responder en 1 día