Commits

TK Soh  committed d43e8eb

overlay: only check network drives if 'localdisks' is selected

  • Participants
  • Parent commits 15f37a8

Comments (0)

Files changed (2)

File tortoise/iconoverlay.py

             print "reading config took %d ticks" % (win32api.GetTickCount() - tc1)
             print "%s: global overlayicons = " % path, global_opts
             print "%s: repo overlayicons = " % path, repo_opts
-            tc1 = win32api.GetTickCount()
-            is_netdrive =  thgutil.netdrive_status(path) is not None
-            print "netdrive check took %d ticks" % (win32api.GetTickCount() - tc1)
-            if (is_netdrive and 'localdisks' in global_opts) \
-                    or 'False' in repo_opts:
+            if ('False' in repo_opts or 'False' in global_opts) or \
+                    ('localdisks' in global_opts and 
+                     thgutil.netdrive_status(path) is not None):
                 print "%s: overlayicons disabled" % path
                 overlay_cache = {None : None}
                 cache_tick_count = win32api.GetTickCount()

File tortoise/thgutil.py

         return True if a network drive is accessible (connected, ...),
         or None if <drive> is not a network drive
         """
+        print "netdrive_status: checking ", drive
         if hasattr(os.path, 'splitunc'):
             unc, rest = os.path.splitunc(drive)
             if unc: # All UNC paths (\\host\mount) are considered nonlocal