validate:Launcher: Use the first media path as a path for http server

We need to have a default path and the first one sounds like a
reasonnable default.
This commit is contained in:
Thibault Saunier 2014-08-08 19:14:02 +02:00
parent 2da2c6cc56
commit 631db75718

View file

@ -334,7 +334,10 @@ user argument, you can thus overrides command line options using that.
options.paths = os.path.join(options.clone_dir, MEDIAS_FOLDER)
if options.http_server_dir is None:
options.http_server_dir = options.paths
if isinstance(options.paths, list):
options.http_server_dir = options.paths[0]
else:
options.http_server_dir = options.paths
if not options.sync and not os.path.exists(options.clone_dir) and \
options.clone_dir == os.path.join(options.clone_dir, MEDIAS_FOLDER):