From 3180df7778cc032f46d2705a55d881fbc40f896b Mon Sep 17 00:00:00 2001 From: Daira Hopwood Date: Thu, 29 Jan 2015 17:47:57 +0000 Subject: [PATCH] Add a comment about usage of fileutil.to_windows_long_path. Signed-off-by: Daira Hopwood --- src/allmydata/util/fileutil.py | 3 +++ 1 file changed, 3 insertions(+) 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"\\\\"): -- 2.45.2