[baobab] location: improve detection of remote locations
- From: Stefano Facchini <sfacchini src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [baobab] location: improve detection of remote locations
- Date: Sun, 29 Oct 2017 09:41:08 +0000 (UTC)
commit e5ce45c61173c7ca243ed8196e06655078fb260d
Author: Stefano Facchini <stefano facchini gmail com>
Date: Sat Oct 28 22:58:20 2017 +0200
location: improve detection of remote locations
When a GMount has no volume, we try and parse its URI scheme to
detect SFTP or SSH mounts. More schemes could be added if necessary.
src/baobab-location.vala | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/baobab-location.vala b/src/baobab-location.vala
index cbed9b8..c14c9d8 100644
--- a/src/baobab-location.vala
+++ b/src/baobab-location.vala
@@ -96,6 +96,10 @@ namespace Baobab {
public Location.from_mount (Mount mount_) {
mount = mount_;
fill_from_mount ();
+
+ var uri_scheme = Uri.parse_scheme (file.get_uri ());
+ string[] remote_schemes = { "sftp", "ssh" };
+ is_remote = (uri_scheme in remote_schemes);
}
public Location.for_main_volume () {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]