Reduce features used on remote filesystems
This attempts to detect remote filesystems on Linux using the /proc/self/mountinfo file and checking the filesystem against a hardcoded list of remote filesystems. Remote filesystems will not thumbnail, read file data to determine mime types, or calculate directory sizes.
This commit is contained in:
parent
8ced8b0551
commit
dd98622cfa
6 changed files with 372 additions and 243 deletions
10
src/app.rs
10
src/app.rs
|
|
@ -597,10 +597,12 @@ impl App {
|
|||
// This allows handling paths as groups if possible, such as launching a single video
|
||||
// player that is passed every path.
|
||||
let mut groups: HashMap<Mime, Vec<PathBuf>> = HashMap::new();
|
||||
for (mime, path) in paths
|
||||
.iter()
|
||||
.map(|path| (mime_icon::mime_for_path(path), path.as_ref().to_owned()))
|
||||
{
|
||||
for (mime, path) in paths.iter().map(|path| {
|
||||
(
|
||||
mime_icon::mime_for_path(path, None, false),
|
||||
path.as_ref().to_owned(),
|
||||
)
|
||||
}) {
|
||||
groups.entry(mime).or_default().push(path);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue