Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Eject/recreate silently fails if disk is locked #26

Closed
zxcat opened this issue Jan 30, 2023 · 2 comments · Fixed by #28
Closed

bug: Eject/recreate silently fails if disk is locked #26

zxcat opened this issue Jan 30, 2023 · 2 comments · Fixed by #28
Assignees
Labels

Comments

@zxcat
Copy link

zxcat commented Jan 30, 2023

Steps to reproduce:

  1. create new TmpDisk (named test for example)
  2. put some files on it
  3. make it locked with some app, e.g. cd /Volumes/test in iTerm
  4. Try to eject or re-create using TmpDisk menu
  5. check if disk exists (if ejected) or files (from step.2) no more exist

expected: disk disappears on eject or contains no files from step2

actual: nothing happens

furthermore, it seems TmpDisk enters some buggy state. e.g. even if I unlock disk (cd ..). I can't eject or re-create it. And If I eject if using Finder, TmpDisk still shows it in the "Current TmpDisks" menu.

note: maybe it's not iTerm who locks a disk but zsh/plugins/etc, but I can repeat this behavior with other apps, which prevent disk ejection while use it.

@imothee imothee self-assigned this Feb 3, 2023
@imothee imothee added the bug label Feb 3, 2023
@imothee
Copy link
Owner

imothee commented Feb 3, 2023

Hi @zxcat - MacOS used to throw a system alert when an in use disk was attempted to be ejected (so I routed the errors to the console). I'll have to check and see when that functionality changed and if I can add some alerting to the app or if I need to version the functionality.

The original TmpDisk was built more than 10 years ago so it's very possible that MacOS hasn't done that for a long time.

imothee added a commit that referenced this issue Feb 16, 2023
@imothee imothee mentioned this issue Feb 16, 2023
@imothee
Copy link
Owner

imothee commented Feb 16, 2023

Turns out the latest Swift libraries do not throw errors for Disk in Use.
Have added an alert + force eject functionality to https://github.com/imothee/tmpdisk/releases/tag/v2.0.6-alpha

Would love to get some eyes testing it before releasing it to the public channel.
Thanks!

imothee added a commit that referenced this issue May 30, 2023
* Adds spanish localization

* Adds selection for gigabytes and megabytes fixes #27

* Handle locked disks fixes #26

* update zh-hans localizable strings (#29)

update zh-han localizable strings

* Sets default units, updates build for distribution

---------

Co-authored-by: Weimeng Zhu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants