summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xFiler.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/Filer.py b/Filer.py
index bcd6165..e737047 100755
--- a/Filer.py
+++ b/Filer.py
@@ -7,6 +7,7 @@ from os import unlink, path, getenv, listdir, mkdir, urandom
7from shutil import rmtree 7from shutil import rmtree
8from threading import Thread 8from threading import Thread
9from random import randint 9from random import randint
10from sys import stderr, exit
10 11
11from flask import Flask, render_template, jsonify, request, redirect, send_from_directory 12from flask import Flask, render_template, jsonify, request, redirect, send_from_directory
12from flask_dropzone import Dropzone 13from flask_dropzone import Dropzone
@@ -171,6 +172,17 @@ thread = Thread(target=cleaner_thread, args=())
171thread.daemon = True 172thread.daemon = True
172thread.start() 173thread.start()
173 174
175try:
176 if not path.exists(path.join(basedir, 'Dokumente')):
177 mkdir(path.join(basedir, 'Dokumente'))
178 if not path.exists(path.join(basedir, 'Mandanten')):
179 mkdir(path.join(basedir, 'Mandanten'))
180 if not path.exists(path.join(basedir, 'Public')):
181 mkdir(path.join(basedir, 'Public'))
182except:
183 stderr.write("Error: Basedir not accessible\n")
184 exit(1)
185
174if __name__ == "__main__": 186if __name__ == "__main__":
175 parser = ArgumentParser(description="Filer") 187 parser = ArgumentParser(description="Filer")
176 parser.add_argument("-H", "--host", help="Hostname of the Flask app " + "[default %s]" % "127.0.0.1", default="127.0.0.1") 188 parser.add_argument("-H", "--host", help="Hostname of the Flask app " + "[default %s]" % "127.0.0.1", default="127.0.0.1")