fix: 修复创建目录时指定权限为 755

This commit is contained in:
Jiangjie.Bai
2022-10-18 17:47:13 +08:00
parent 33860bb955
commit 4711813af8
6 changed files with 17 additions and 9 deletions

View File

@@ -389,3 +389,10 @@ def static_or_direct(logo_path):
return static(logo_path)
else:
return logo_path
def make_dirs(name, mode=None, exist_ok=False):
""" 默认权限设置为 0o755 """
if mode is None:
mode = 0o755
return os.makedirs(name, mode=mode, exist_ok=exist_ok)