-
Type: Bug
-
Status: Resolved
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: NoFixVersionApplicable
-
Fix Version/s: 5.2.2
-
Component/s: Direct Edit
-
Release Notes Summary:Handle forbidden filenames
-
Release Notes Description:
-
Epic Link:
-
Tags:
-
Sprint:nxDrive 11.2.23
-
Story Points:1
Error
Sentry Issue: NUXEO-DRIVE-20R
OSError: [WinError 87] Paramètre incorrect: 'C:\\Users\\USER\\.nuxeo-drive\\edit\\DOCUID.dl\\palette : 10 VERITABLES CREPES BRETONNES TOUTES MARQUES.docx' -> 'C:\\Users\\assqua\\.nuxeo-drive\\edit\\DOCUID_files-files-0-file\\palette : 10 VERITABLES CREPES BRETONNES TOUTES MARQUES.docx' File "nxdrive\direct_edit.py", line 513, in edit File "nxdrive\direct_edit.py", line 500, in edit File "nxdrive\direct_edit.py", line 482, in _prepare_edit File "nxdrive\utils.py", line 697, in safe_rename File "pathlib.py", line 1319, in rename
Analysis
The filename is not escaped, and ":" is forbidden on Windows.
Fix
Both lines should use safe_filename() to prevent such error.
Expected result:
- It must work as any other "normal" files:
- The file is opened.
- The file is locked on the server.
- The file changes are updated.
- The file is unlocked on the server.
- Is referenced in