[gnome-shell] automountManager: Don't mount already-mounted volumes



commit a9817f483298ee2c8026a4ac946f6ec2bf716875
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Wed Sep 28 16:29:45 2011 -0400

    automountManager: Don't mount already-mounted volumes
    
    Don't pester the user with autorun popups if a volume is already mounted.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=660397

 js/ui/automountManager.js |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/automountManager.js b/js/ui/automountManager.js
index 93b093a..edcdd80 100644
--- a/js/ui/automountManager.js
+++ b/js/ui/automountManager.js
@@ -209,10 +209,14 @@ AutomountManager.prototype = {
             }
         }
 
+        // Volume is already mounted, don't bother.
+        if (volume.get_mount())
+            return;
+
         if (!this._settings.get_boolean(SETTING_ENABLE_AUTOMOUNT) ||
             !volume.should_automount() ||
             !volume.can_mount()) {
-	    // allow the autorun to run anyway; this can happen if the
+            // allow the autorun to run anyway; this can happen if the
             // mount gets added programmatically later, even if 
             // should_automount() or can_mount() are false, like for
             // blank optical media.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]