Commit c7848826 by Őry Máté

store: minor refactor

parent 2802f2b9
......@@ -11,8 +11,14 @@ mask = IN_CREATE | IN_MODIFY | IN_DONT_FOLLOW
Register given file to ~/../.top dir as a symbolic link.
"""
def update_new(name):
if os.path.normpath(name).find("/.") != -1:
return
norm = os.path.normpath(name)
if norm != name:
return # link
name = norm
if name.find("/.") != -1:
return # hidden file (or file in hidden dir)
home = pwd.getpwuid(os.stat(name).st_uid).pw_dir
if not name.startswith(home):
return # outside home
......
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