Skip to content

Unmounting a mount containing a file being edited by Code does not result in a "busy" warning #1813

Open

Description

@jeremypw

What Happened?

Unmounting a mount containing a file being edited by Code does not result in a "busy" warning

Steps to Reproduce

  1. Mount e.g. a USB stick
  2. Open a text file on that mount with Code
  3. Ensure "Save files when changed" s OFF
  4. Make some changes
  5. Unmount the mount using Files (latest source)
  6. No warning is given that the mount is in use by Code

Expected Behavior

A user might expect to get a warning in this situation (although other text editors do not hold files open on the mount under similar circumstances either).

Fortunately Code handles the situation gracefully and gives the user the opportunity to save the file elsewhere or remount.

The desired behaviour is uncertain and suggestions are invited.

OS Version

8.x (Circe)

OS Architecture

amd64 (on most hardwares)

Session Type

Secure Session (Wayland, This is the default)

Software Version

Early Access or Compiled from git

Log Output

Hardware Info

No response

Activity

  1. added theissue type on Sep 3, 2026
  2. kahhong commented on Sep 8, 2026

    @kahhong
    Contributor

    OS Version

    8.1 (Circe)

    Code version

    Code 8.3.2

    Files version

    io.elementary.files 7.3.2


    Hi, I tried to reproduce this problem and found a few interesting interactions.

    1. If the file opened in Code has not been modified, Code immediately closes the file when the mount is ejected (without any warnings).

    2. If the file opened in Code was modified but not saved, Code will show a dialog when the mount is ejected. However, the "Save Duplicate" button keeps reopening the same dialog and the "Ignore" button closes the dialog and leaves the modified file open.

    Screenshot of "Save Duplicate" dialog Image

    Further attempts to close Code or the file will display a dialog asking if the user wants to save the file. The "Save" button reopens the "Save Duplicate" dialog (which does not work), and the "Close without saving" button closes the file without saving it. If you choose "Save Duplicate" now, the entire DE crashes and restarts.

    Screenshot of "Close without saving" dialog Image

    So, I wouldn't say that Code handled this situation gracefully given that the user cannot save the file elsewhere.

    P.S. This is my first time contributing to this project, please provide any feedback or things I can do to make the comment more helpful :)

  3. jeremypw commented on Sep 8, 2026

    @jeremypw
    CollaboratorAuthor

    @kahhong Thanks for the extra information. You are right - there is an issue with Code under some circumstances - the Save Duplicate button does not work as expected. I will raise an issue in the Code project and get it fixed.

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

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions