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

Panic when mimeapps.list is not writable #54

Open
1sixth opened this issue Nov 21, 2021 · 2 comments
Open

Panic when mimeapps.list is not writable #54

1sixth opened this issue Nov 21, 2021 · 2 comments

Comments

@1sixth
Copy link

1sixth commented Nov 21, 2021

It seems that handlr expects mimeapps.list to be writable even handlr doesn't need to write to it.

$ handlr --version
handlr 0.6.4
$ chmod -w ~/.config/mimeapps.list
$ export RUST_BACKTRACE=full
$ handlr --version
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Io(Os { code: 13, kind: PermissionDenied, message: "Permission denied" })', src/apps/user.rs:12:65
stack backtrace:
   0:     0x5643ea23f4a5 - <unknown>
   1:     0x5643ea1d3c8c - <unknown>
   2:     0x5643ea23e9e4 - <unknown>
   3:     0x5643ea23e7cf - <unknown>
   4:     0x5643ea25e468 - <unknown>
   5:     0x5643ea25e3e6 - <unknown>
   6:     0x5643ea25e3a2 - <unknown>
   7:     0x5643ea15f100 - <unknown>
   8:     0x5643ea15f432 - <unknown>
   9:     0x5643ea16ed9e - <unknown>
  10:     0x5643ea172c1c - <unknown>
  11:     0x5643ea234a43 - <unknown>
  12:     0x5643ea15d18b - <unknown>
  13:     0x5643ea1e9c83 - <unknown>
  14:     0x5643ea1e28e3 - <unknown>
  15:     0x5643ea1e5662 - <unknown>
  16:     0x7efe507f0b25 - __libc_start_main
  17:     0x5643ea16975e - <unknown>
  18:                0x0 - <unknown>

I think handlr should try to write to mimeapps.list only if called with set, unset and add.

@SenchoPens
Copy link

That makes it a no-go on declarative distros like NixOS and Guix :(

@Artturin
Copy link

this was fixed in #48 however there hasn't been a release since

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants