* pre-create subdir it needed
* pre-create subdir it needed: check if already exists
* use os.makedirs() to handle subdir1/subdir2/blabla
* protect against malicous "..", and better naming
* check for Windows \ and POSIX /
* check again within path, typo and formatting
* regex: square brackets
* cleanup: only "/" can occur in par2
* cleanup: better logging
* unit test: testing of filesystem.renamer()
* if subdir specified in par2: let filesystem.renamer() do all the work
* if create_local_directories=True, then renamer() must stay within specified directory. Plus unittest for that.
* if create_local_directories=True, then renamer() must stay within specified directory. Plus unittest for that.
* more comments in code
* use filesystem.create_all_dirs(), less logging, clearer "..", and other feedback from Safihre
* make remote black happy too
* Small changes in wording of comments and error
Co-authored-by: Safihre <safihre@sabnzbd.org>
* urlgrabber limit filename to avoid tracebacks
* urlgrabber limit filename to avoid tracebacks: black
* urlgrabber limit filename to avoid tracebacks: black
* filename_limit ... 2020-01-15
* filename_limit: into sanitize_filename()
* filename_limit: black and typo and logging
* filename_limit: debug show full filename
* filename_limit: unittests
* sanitize_filename(): take care of feedback: one ASCII method, handly silly extension lengths
* sanitize_filename(): tests/test_filesystem.py ... make black happy
* sanitize_filename(): typo in comment
* sanitize_filename(): test_filesystem.py ... black
* sanitize_filename(): more unittests, and DEF_FILE_MAX (yet without GUI option)
* sanitize_filename(): always use DEF_FILE_MAX
* sanitize_filename(): black
* sanitize_filename(): handle UTF8 correct (>1 byte). DEF_FILE_MAX = 255
* sanitize_filename: measure bytes (not chars), DEF_FILE_MAX = 255 - 6, no test-writing in unittests
* sanitize_filename: constants.py ... black
* sanitize_filename: comment about extension
* DEF_FILE_MAX = 255 - 10 again, to solve adding ".nzb.gz" elsewhere
- Catch all Selenium exceptions while waiting for the download to complete
- Correctly set autodisconnect=0
- Make job-name even more unique
- Wait for the RSS-added job to finish fetching
- Move sabnzbd.basic.ini to data folder
- Use new SAB_DATA_DIR
- Optimized imports
Also renamed the recursive_listdir function so it can also be non-recursive. Which was very easy due to the extensive test-set by @jcfp!
Relates to #1304 (that NZB triggered invalid reading of sub-dirs in incomplete folder)
* extend filesystem tests
* fix test failure when no explicit umask was set
* have black uglify the code
* require case-sensitive fs for test_capitalization_linux
* run black with -l120 instead
* make windows-compatible, fix some minor issues
* mark xfail rather than comment out part of trim_win_path
Each template must now reside under the "interfaces" folder.
The "standard" templates are now called "Default".
The Config-General screen now shows all interfaces found in the "interfaces" folders and lets the user pick one.
Only through the command option -t it is possible to specify an absolute path.
Any non-absolute path in the -t option is matched against the templates in "interfaces", only when one is matched it will be used. Otherwise the Default will be used. Any templates missing the template/main.tmpl constructions is refused and the Default is used.
Also: set the $web_name variable for the template. This is to be used in the "default.css?version=$web_name" construction, to ensure that the browser picks up the correct default.css when changing interfaces.