Skip to content

Commit

Permalink
Replace os.makedirs to mkdir. (#251)
Browse files Browse the repository at this point in the history
解决Tty Logs 日志跨天后目录权限不对的问题
  • Loading branch information
kelein authored and ibuler committed Jun 7, 2016
1 parent 3176156 commit c93c8de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jlog/views.py
Expand Up @@ -274,7 +274,7 @@ def save(self, path=LOG_DIR):
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')
Expand Down

0 comments on commit c93c8de

Please sign in to comment.