Commit f3d09456 by Őry, Máté

store-server: toplist s/normpath/realpath/

parent 73369d3f
...@@ -12,7 +12,7 @@ mask = IN_CREATE | IN_MODIFY | IN_DONT_FOLLOW ...@@ -12,7 +12,7 @@ mask = IN_CREATE | IN_MODIFY | IN_DONT_FOLLOW
Register given file to ~/../.top dir as a symbolic link. Register given file to ~/../.top dir as a symbolic link.
""" """
def update_new(name): def update_new(name):
norm = os.path.normpath(name) norm = os.path.realpath(name)
if norm != name: if norm != name:
return # link return # link
name = norm name = norm
...@@ -24,7 +24,7 @@ def update_new(name): ...@@ -24,7 +24,7 @@ def update_new(name):
if not name.startswith(home): if not name.startswith(home):
return # outside home return # outside home
top_dir = os.path.normpath(os.path.join(home, "../.top")) top_dir = os.path.realpath(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