Permalink
Browse files

Replace os.makedirs to mkdir. (#251)

解决Tty Logs 日志跨天后目录权限不对的问题
  • Loading branch information...
1 parent 3176156 commit c93c8de7fe0aa40694804799c87c93ca9b555ffa @Keleir Keleir committed with ibuler Jun 7, 2016
Showing with 1 addition and 1 deletion.
  1. +1 −1 jlog/views.py
View
@@ -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')

0 comments on commit c93c8de

Please sign in to comment.