Skip to content

Commit 48af543

Browse files
committed
Linux: register all volume types at startup
init_volume_manager was only registering get_mounted_volumes(), missing network mounts and cloud drives. Use list_locations() (minus favorites) so GVFS SMB shares are in VolumeManager from the start.
1 parent d40ea25 commit 48af543

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

  • apps/desktop/src-tauri/src/file_system

apps/desktop/src-tauri/src/file_system/mod.rs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,16 @@ pub fn init_volume_manager() {
9999
}
100100
}
101101

102-
// Register mounted volumes and cloud drives (Linux)
102+
// Register mounted volumes, cloud drives, and network mounts (Linux)
103103
#[cfg(target_os = "linux")]
104104
{
105-
let mounts = linux_mounts::parse_proc_mounts();
106-
let mounted = crate::volumes_linux::get_mounted_volumes(&mounts);
107-
log::info!("Registering {} mounted volume(s)", mounted.len());
108-
for location in mounted {
105+
let locations = crate::volumes_linux::list_locations();
106+
let non_fav: Vec<_> = locations
107+
.iter()
108+
.filter(|l| l.category != crate::volumes_linux::LocationCategory::Favorite)
109+
.collect();
110+
log::info!("Registering {} volume(s)", non_fav.len());
111+
for location in non_fav {
109112
let volume = Arc::new(LocalPosixVolume::new(&location.name, &location.path));
110113
VOLUME_MANAGER.register(&location.id, volume);
111114
log::info!(" Registered volume: {} -> {}", location.id, location.path);

0 commit comments

Comments
 (0)