-
Type: Bug
-
Status: Open
-
Priority: Critical
-
Resolution: Unresolved
-
Affects Version/s: 4.1.4
-
Fix Version/s: Not yet scheduled version
-
Component/s: Framework
-
Epic Link:
-
Story Points:1
Error
Sentry Issue: NUXEO-DRIVE-452
OSError: [Errno 18] Cross-device link: '/Users/USER/.nuxeo-drive/.tmp/ENGINE/DOCID/file.jpg' -> '/Volumes/Data/NXD/IT/TestLocal/file.jpg' File "nxdrive/engine/processor.py", line 283, in _execute File "nxdrive/engine/processor.py", line 1325, in _synchronize_remotely_created File "nxdrive/engine/processor.py", line 1398, in _create_remotely File "nxdrive/client/local/base.py", line 506, in move File "nxdrive/utils.py", line 590, in safe_rename File "pathlib.py", line 1334, in rename
Analysis
When find_suitable_tmp_dir() does not find a suitable folder that is on the same hard-drive than the sync folder, it will fallback to the $HOME/.nuxeo-drive folder. And obviously, we will end with folders on different HD and thus the error.
Proof:
>>> from pathlib import Path >>> from nxdrive.utils import find_suitable_tmp_dir >>> # Here, sync_folder exists >>> sync_folder = Path("/Volumes/Nuxeo Drive/Nuxeo Drive.app/Contents") >>> home_folder = Path("/Users/tiger-222/.nuxeo-drive") >>> find_suitable_tmp_dir(sync_folder, home_folder) PosixPath('/Volumes/Nuxeo Drive/Nuxeo Drive.app/.nuxeo-drive') >>> # Here, sync_folder does not exist >>> sync_folder = Path("/Volumes/Nuxeo Drive/Nuxeo Drive.app/Contentssssssss") >>> find_suitable_tmp_dir(sync_folder, home_folder) PosixPath('/Users/tiger-222/.nuxeo-drive')
Fix
We should enforce the same hard-drive even more than what is done currently. If the sync folder does not exist, then create it and use its parent.
- is related to
-
NXDRIVE-1779 Ensure the tmp folder is on the same partition than the sync folder
- Resolved