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

オープン 初心者向け
#4,800 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
79/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
android, kotlin
領域
backend, mobile

調査の方向性

ショートカットのパスが開かれると Issue に記載されている MainActivity.java の2019~2029行付近から始め、ディレクトリとファイルをどのように区別しているかを追ってください。Utils.java の476~491行付近で、ショートカットのパス処理を確認してください。フォルダーが見つからない場合にエラーを発生させ、現在のフォルダーを開いたままにしてください。ホーム画面にフォルダーのショートカットを作成してからフォルダーの名前を変更し、そのショートカットをタップして確認してください。

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Kotlin
スター
6.5k
フォーク
1.7k
平均マージ
1日 1時間
マージ済み PR(30日)
10

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

TeamAmaze/AmazeFileManager のほかの issue

TeamAmaze/AmazeFileManager の issue をすべて見る

似ている issue

Kotlin の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。