* Translate ascii control chars below value 32
* Try to make code and tests consistent
* More test fixing
* Delete too much
* Different approach
* Finally got it?
* Start from 0
* Convert \0 to _ for all systems
* Check if CH_ILLEGAL_WIN is translated to CH_LEGAL_WIN
* Test specific chars
* functions to test directory for writing capabilities
* functions to test directory for writing capabilities
* use checking in postproc, and give warning if needed
* use checking in postproc, and give warning if needed
* put into function, with translatable folder names
* remove test file if still there
* better message formatting
* remove friendly directory name. Less comments
* move stuff into filesystem.py
* clean it up
* unit test for check_directory_writing_capability on tempdir
* unit test for check_directory_writing_capability on tempdir
* unit test for check_directory_writing_capability on tempdir
* unit test for check_directory_writing_capability on tempdir
* unit test for check_directory_writing_capability on tempdir
* Update sabnzbd/filesystem.py
Co-authored-by: Safihre <safihre@sabnzbd.org>
* feedback processed
* feedback processed
* feedback processed
* Merge remote-tracking branch 'origin/check_filesystem_capabilty' into check_filesystem_capabilty
# Conflicts:
# sabnzbd/filesystem.py
* typo: uniformed on "writable"
Co-authored-by: Safihre <safihre@sabnzbd.org>
* Do not apply permissions if not requested by the user, but remove xbits
* Verify umask and user-permissions and warn for potential access problems
* Correctly name umask/permissions options
* Apply permissions only on download_dir creation
* Refactor some permissions related actions
* Block setting permissions=0 and only stat when no custom_permissions
* 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