Commit c93c8de7 authored by Kallen Ding's avatar Kallen Ding Committed by ibuler

Replace os.makedirs to mkdir. (#251)

解决Tty Logs 日志跨天后目录权限不对的问题
parent 31761566
...@@ -274,7 +274,7 @@ class TermLogRecorder(object): ...@@ -274,7 +274,7 @@ class TermLogRecorder(object):
self.filename = filename self.filename = filename
filepath = os.path.join(path, 'tty', date, filename + '.zip') filepath = os.path.join(path, 'tty', date, filename + '.zip')
if not os.path.isdir(os.path.join(path, 'tty', date)): if not os.path.isdir(os.path.join(path, 'tty', date)):
os.makedirs(os.path.join(path, 'tty', date), mode=0777) mkdir(os.path.join(path, 'tty', date), mode=777)
while os.path.isfile(filepath): while os.path.isfile(filepath):
filename = str(uuid.uuid4()) filename = str(uuid.uuid4())
filepath = os.path.join(path, 'tty', date, filename + '.zip') filepath = os.path.join(path, 'tty', date, filename + '.zip')
......
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