如果目录存在,就不初始化

pull/199/head
midoks 3 years ago
parent eedaef7eec
commit 416e9e7cda
  1. 4
      class/core/site_api.py

@ -2103,10 +2103,14 @@ location ^~ {from} {
return rewriteList
def createRootDir(self, path):
autoInit = False
if not os.path.exists(path):
autoInit = True
os.makedirs(path)
if not mw.isAppleSystem():
mw.execShell('chown -R www:www ' + path)
if autoInit:
mw.writeFile(path + '/index.html', 'Work has started!!!')
mw.execShell('chmod -R 755 ' + path)

Loading…
Cancel
Save