From: Daira Hopwood Date: Thu, 29 Jan 2015 17:47:57 +0000 (+0000) Subject: Add a comment about usage of fileutil.to_windows_long_path. X-Git-Url: https://git.rkrishnan.org/vdrive/%22file:/listings/frontends/components/com_hotproperty/css/running.html?a=commitdiff_plain;h=3180df7778cc032f46d2705a55d881fbc40f896b;p=tahoe-lafs%2Ftahoe-lafs.git Add a comment about usage of fileutil.to_windows_long_path. Signed-off-by: Daira Hopwood --- diff --git a/src/allmydata/util/fileutil.py b/src/allmydata/util/fileutil.py index 582139e1..9a9eb54f 100644 --- a/src/allmydata/util/fileutil.py +++ b/src/allmydata/util/fileutil.py @@ -358,6 +358,9 @@ def to_windows_long_path(path): # replace it with '\' here. path = path.replace(u"/", u"\\") + # Note that other normalizations such as removing '.' and '..' should + # be done outside this function. + if path.startswith(u"\\\\?\\") or path.startswith(u"\\\\.\\"): return path elif path.startswith(u"\\\\"):