Commit c8a7d50d by Őry Máté

store: store unique top list

parent 30d102f7
...@@ -17,7 +17,9 @@ def update_new(name): ...@@ -17,7 +17,9 @@ def update_new(name):
try: try:
os.mkdir(top_dir) os.mkdir(top_dir)
except OSError: except OSError:
pass for f in os.listdir(top_dir):
if os.readlink(os.path.join(top_dir, f)) == name:
return
for i in range(1, COUNT): for i in range(1, COUNT):
try: try:
os.rename(os.path.join(top_dir, str(i+1)), os.path.join(top_dir, str(i))) os.rename(os.path.join(top_dir, str(i+1)), os.path.join(top_dir, str(i)))
......
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