Browse Source
* 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>tags/3.2.1RC1
3 changed files with 98 additions and 3 deletions
Loading…
Reference in new issue