storage: Directory selection form improvements

- Action script:
  - must not be root when validating directory
  - return only first validation error
- Directory selection form, transmission, deluge:
  show the download path as it is in the configuration,
  the path is resolved only on form submit.
- Tests: add relative path checks, refactor parametrize code

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Veiko Aasa authored and James Valleroy committed 2020-03-02 20:51:41 -05:00
1 parent 03b4accefb
commit e7afa69155
7 files changed
+26 -46

No files matched your search

+1 -1
View File
@@ -103,7 +103,7 @@ class DirectorySelectForm(AppForm):
if title:
self.fields['storage_dir'].label = title
self.validator = validator
self.default = os.path.normpath(default)
self.default = default
self.set_form_data()
def clean(self):