1. TortoiseHg
  2. TortoiseHg
  3. thg

Commits

Steve Borho  committed de02915

thgutil: UNC paths are not considered local disks

fixes #68

  • Participants
  • Parent commits b1a6be4
  • Branches default

Comments (0)

Files changed (1)

File tortoise/thgutil.py

View file
  • Ignore whitespace
         return True if a network drive is accessible (connected, ...),
         or None if <drive> is not a network drive
         """
+        if hasattr(os.path, 'splitunc'):
+            unc, rest = os.path.splitunc(drive)
+            if unc: # All UNC paths (\\host\mount) are considered nonlocal
+                return True
         letter = os.path.splitdrive(drive)[0]
         _drives, total, _ = win32net.NetUseEnum(None, 1, 0)
         for drv in _drives: