Replace os.makedirs to mkdir. (#251)

解决Tty Logs 日志跨天后目录权限不对的问题
pull/256/head
Kallen Ding 2016-06-07 10:50:38 +08:00 committed by ibuler
parent 3176156639
commit c93c8de7fe
1 changed files with 1 additions and 1 deletions

View File

@ -274,7 +274,7 @@ class TermLogRecorder(object):
self.filename = filename
filepath = os.path.join(path, 'tty', date, filename + '.zip')
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):
filename = str(uuid.uuid4())
filepath = os.path.join(path, 'tty', date, filename + '.zip')