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

GlobError unwrap happens #152

Closed
21pages opened this issue Nov 10, 2023 · 3 comments
Closed

GlobError unwrap happens #152

21pages opened this issue Nov 10, 2023 · 3 comments
Labels

Comments

@21pages
Copy link

21pages commented Nov 10, 2023

rustdesk/rustdesk#3556 (comment)

Abort message: 'called Result::unwrap() on an Err value: GlobError { path: "/storage/emulated/0/RustDesk/Logs", error: Os { code: 13, kind: PermissionDenied, message: "Permission denied" } }'

version: 0.25.6, maybe related to

let mut log_files: Vec<PathBuf> = glob::glob(pattern)

glob::glob(&pattern).unwrap(/*ok*/).map(Result::unwrap).collect();

@emabee emabee added the bug label Nov 10, 2023
@emabee
Copy link
Owner

emabee commented Nov 10, 2023

Only the latter is critical, I think. The first one already does .filter_map(Result::ok), i.e., ignores errors silently.
The second one did .map(Result::unwrap), and now also does .filter_map(Result::ok).

@21pages
Copy link
Author

21pages commented Nov 10, 2023

If the PermissionDenied error is caused by glob::glob, does it mean there is no read directory permission?

@emabee
Copy link
Owner

emabee commented Nov 10, 2023

I really do not know. Would be very much interested in more details.

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

No branches or pull requests

2 participants