Skip to content

A pinned file shortcut opens an empty editor after the file is renamed or deleted #535

Backlog

Description

@PropertyGen

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.6.5 (versionCode 17; also observed in 1.6.1–1.6.3)

Affected Android/Custom ROM version

Android 11 (API 30), Google APIs emulator image

Affected device model

Android emulator (x86, 1080×1920)

How did you install the app?

GitHub releases

Steps to reproduce the bug

  1. Create FmTest/note.txt with some text. Long-press it and choose Create shortcut → Add automatically. Tap the shortcut and open with File Manager to verify the content.
  2. Rename note.txt to memo.txt inside File Manager. Tap the old launcher shortcut and open with File Manager. Optionally type some text and tap Save.
  3. As a separate case, create a shortcut for list.txt, delete the file inside File Manager, and tap its launcher shortcut.

Expected behavior

The pinned shortcut opens the renamed file or is disabled when its target is unavailable. A missing file does not open as an empty, saveable document.

Actual behavior

After rename, the shortcut opens an empty editor titled note.txt. A brief “An unknown error occurred” toast appears. Typing and saving creates a new note.txt next to memo.txt. After delete, the shortcut remains pinned and opens an empty editor with the same toast. Both cases reproduced twice on 1.6.5.

Screenshots/Screen recordings

Screenshots

Pinned shortcut Before rename
Pinned shortcut Before rename
File renamed Old shortcut opens empty editor
File renamed Old shortcut opens empty editor
Saving creates another file Shortcut remains after delete
Saving creates another file Shortcut remains after delete
Empty editor after delete
Empty editor after delete

Additional information

The pinned shortcut uses the original path as the shortcut ID and intent data. The rename and delete handlers update favorites but do not update or disable the pinned shortcut.

private fun createShortcut() {
val manager = activity.getSystemService(ShortcutManager::class.java)
if (manager.isRequestPinShortcutSupported) {
val path = getFirstSelectedItemPath()
val drawable = resources.getDrawable(R.drawable.shortcut_folder).mutate()
getShortcutImage(path, drawable) {
val intent = Intent(activity, SplashActivity::class.java)
intent.action = Intent.ACTION_VIEW
intent.flags =
intent.flags or
Intent.FLAG_ACTIVITY_NEW_TASK or
Intent.FLAG_ACTIVITY_CLEAR_TASK or
Intent.FLAG_ACTIVITY_NO_HISTORY
intent.data = Uri.fromFile(File(path))
val shortcut = ShortcutInfo.Builder(activity, path)
.setShortLabel(path.getFilenameFromPath())
.setIcon(Icon.createWithBitmap(drawable.convertToBitmap()))
.setIntent(intent)
.build()
manager.requestPinShortcut(shortcut, null)
}
}
}

Activity

  1. added
    bug
    needs triage
    on Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugneeds triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions