[PATCH] paths: prevent crash on non-Windows systems (fixes #1718)

1 view
Skip to first unread message

michals...@gmail.com

unread,
Mar 4, 2012, 8:17:40 AM3/4/12
to thg...@googlegroups.com
# HG changeset patch
# User Michal Sznajder <michals...@gmail.com>
# Date 1330810216 -3600
# Branch private-work
# Node ID e707491738edac509ec75235f52060c4d48bc186
# Parent 9fbf6b7fe9d597167a177771c2d945a3ca1065bd
paths: prevent crash on non-Windows systems (fixes #1718)

Repositories located on UNC paths have a different icon in reporegistry (added
in f30747748bfd). Detection is done with paths.is_unc_path() that was
implemented only for Windows causing exception.

diff --git a/tortoisehg/util/paths.py b/tortoisehg/util/paths.py
--- a/tortoisehg/util/paths.py
+++ b/tortoisehg/util/paths.py
@@ -133,6 +133,9 @@
"""
return False

+ def is_unc_path(path):
+ return False
+
def is_on_fixed_drive(path):
return True

Yuya Nishihara

unread,
Mar 4, 2012, 11:04:46 AM3/4/12
to thg...@googlegroups.com

# HG changeset patch
# User Michal Sznajder <michals...@gmail.com>
# Date 1330810216 -3600
# Branch private-work
# Node ID e707491738edac509ec75235f52060c4d48bc186
# Parent  9fbf6b7fe9d597167a177771c2d945a3ca1065bd
paths: prevent crash on non-Windows systems (fixes #1718)

Repositories located on UNC paths have a different icon in reporegistry (added
in f30747748bfd). Detection is done with paths.is_unc_path() that was
implemented only for Windows causing exception.

Pushed to default as  bb24362160f3, thanks!
Reply all
Reply to author
Forward
0 new messages