Commit c70536ff by Őry Máté

store: also ignore files outside home

parent 07e2b4c5
...@@ -11,7 +11,9 @@ def update_new(name): ...@@ -11,7 +11,9 @@ def update_new(name):
if os.path.normpath(name).find("/.") != -1: if os.path.normpath(name).find("/.") != -1:
return return
home = pwd.getpwuid(os.stat(name).st_uid).pw_dir home = pwd.getpwuid(os.stat(name).st_uid).pw_dir
top_dir = os.path.join(home, "../.top") if not name.startswith(home):
return
top_dir = os.path.normpath(os.path.join(home, "../.top"))
try: try:
os.mkdir(top_dir) os.mkdir(top_dir)
except OSError: except OSError:
......
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 sign in to comment