Commit 948084fa by rfkelly0

fix autorun.inf handling in Win32SafetyFS

parent c3148641
...@@ -913,16 +913,16 @@ class Win32SafetyFS(WrapFS): ...@@ -913,16 +913,16 @@ class Win32SafetyFS(WrapFS):
path = relpath(normpath(path)) path = relpath(normpath(path))
path = path.replace(":","__colon__") path = path.replace(":","__colon__")
if not self.allow_autorun: if not self.allow_autorun:
if path.lower().startswith("/_autorun."): if path.lower().startswith("_autorun."):
path = "/" + path[2:] path = path[1:]
return path return path
def _decode(self,path): def _decode(self,path):
path = relpath(normpath(path)) path = relpath(normpath(path))
path = path.replace("__colon__",":") path = path.replace("__colon__",":")
if not self.allow_autorun: if not self.allow_autorun:
if path.lower().startswith("/autorun."): if path.lower().startswith("autorun."):
path = "/_" + path[1:] path = "_" + path
return path return path
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment