diff options
-rwxr-xr-x | Filer.py | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -7,6 +7,7 @@ from os import unlink, path, getenv, listdir, mkdir, urandom | |||
7 | from shutil import rmtree | 7 | from shutil import rmtree |
8 | from threading import Thread | 8 | from threading import Thread |
9 | from random import randint | 9 | from random import randint |
10 | from sys import stderr, exit | ||
10 | 11 | ||
11 | from flask import Flask, render_template, jsonify, request, redirect, send_from_directory | 12 | from flask import Flask, render_template, jsonify, request, redirect, send_from_directory |
12 | from flask_dropzone import Dropzone | 13 | from flask_dropzone import Dropzone |
@@ -171,6 +172,17 @@ thread = Thread(target=cleaner_thread, args=()) | |||
171 | thread.daemon = True | 172 | thread.daemon = True |
172 | thread.start() | 173 | thread.start() |
173 | 174 | ||
175 | try: | ||
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')) | ||
182 | except: | ||
183 | stderr.write("Error: Basedir not accessible\n") | ||
184 | exit(1) | ||
185 | |||
174 | if __name__ == "__main__": | 186 | if __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") |