Home-screen shortcut to a folder that no longer exists opens an "open with" chooser instead of an error

Abierto Apto para principiantes
#4,800 0 comentarios 0 reacciones 0 asignados Ver en GitHub

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
79/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
android, kotlin
Área
backend, mobile

Línea de trabajo

Empieza en MainActivity.java, cerca de las líneas 2019–2029, donde la incidencia indica que se abren las rutas de los accesos directos, y sigue cómo distingue los directorios de los archivos. Comprueba el manejo de las rutas de los accesos directos en Utils.java, cerca de las líneas 476–491. Haz que la falta de una carpeta produzca un error y mantenga abierta la carpeta actual; verifícalo cambiando el nombre de una carpeta después de crear su acceso directo en la pantalla de inicio y tocando el acceso directo.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Describe the bug
When a home-screen folder shortcut ("Add Shortcut") points to a folder that no longer exists, for example because it was renamed in Amaze, tapping it does not show an error. Amaze stays at the storage root and Android shows an app chooser (Certificate Installer, Chrome, Contacts), because the missing path is opened as a file.

To Reproduce
Steps to reproduce the behavior:

  1. Long-press a folder (here TestB) → ⋮ → "Add Shortcut" → "Add automatically".
  2. In Amaze, rename TestB to TestC.
  3. Go to the home screen and tap the "TestB" shortcut.
  4. Amaze shows /storage/emulated/0 and an "open with" chooser appears.

Expected behavior
A message that the folder no longer exists (and ideally the shortcut is updated or disabled when the folder is renamed in Amaze), not an app chooser for a non-existent file.

Screenshots

home shortcut app chooser after tap
01-home-shortcut 02-app-chooser-after-tap
The "TestB" shortcut on the home screen. After renaming the folder and tapping the shortcut.

Smartphone (please complete the following information):

  • Device: Android Emulator (google_apis image)
  • OS: Android 11 (API 30)
  • Rooted: No
  • Version: 3.11.5 (versionCode 127, release APK from GitHub). Also seen on 3.11.4 and 3.11.3.

Additional context
The path is opened as a folder only if it is a directory; anything else, including a path that does not exist, goes to FileUtils.openFile: MainActivity.java#L2019-L2029

The shortcut stores the path as its id and extra (Utils.java#L476-L491) and is not updated after a rename.

Possible fix: if the path does not exist, show an error toast (and stay at the current folder) instead of calling openFile.

Similar older report for the drawer: #328.

Lenguaje dominante
Kotlin
Estrellas
6.5k
Forks
1.7k
Merge medio
1 d 1 h
PR fusionados (30 d)
10

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de TeamAmaze/AmazeFileManager

Todos los issues de TeamAmaze/AmazeFileManager

Issues similares

Más issues de Kotlin

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.