Commit ae42b27a authored by wanli's avatar wanli

update

parent b251980e
...@@ -18,7 +18,7 @@ config.read(os.path.join(os.getcwd(), "config.ini")) ...@@ -18,7 +18,7 @@ config.read(os.path.join(os.getcwd(), "config.ini"))
def getSortDir(path): def getSortDir(path):
lists = os.listdir(path) lists = os.listdir(path)
print(lists) print(lists)
lists.sort(key=lambda fn: os.path.getmtime(path + '\\' + fn)) lists.sort(key=lambda fn: os.path.getmtime(os.sep.join([path, fn])))
filepath = os.path.join(path, lists[-1]) filepath = os.path.join(path, lists[-1])
print(filepath) print(filepath)
return filepath return filepath
......
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