Uploaded image for project: 'Nuxeo Drive '
  1. Nuxeo Drive
  2. NXDRIVE-1775

Bypass PermissionError raised from Path.resolve()

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 4.1.2
    • Fix Version/s: 4.1.4
    • Component/s: Framework

      Description

      Issues

      Sentry Issue: NUXEO-DRIVE-V8

      PermissionError: [WinError 32] Le processus ne peut pas accéder au fichier car ce fichier est utilisé par un autre processus: 'D:\\Users\\USER\\.nuxeo-drive\\edit\\DOCUID_files-files-1-file\\FILE.xls'
      (3 additional frame(s) were not displayed)
      ...
        File "nxdrive\autolocker.py", line 135, in _lock_file
        File "nxdrive\direct_edit.py", line 107, in autolock_lock
        File "nxdrive\client\local_client.py", line 736, in get_path
        File "pathlib.py", line 1141, in resolve
        File "pathlib.py", line 193, in resolve
      
      Unhandled error
      

      Sentry Issue: NUXEO-DRIVE-V7

      PermissionError: [WinError 32] Le processus ne peut pas accéder au fichier car ce fichier est utilisé par un autre processus: 'C:\\Users\\USER\\Documents\\Nuxeo Drive\\FILE.doc'
      (1 additional frame(s) were not displayed)
      ...
        File "nxdrive\client\local_client.py", line 745, in abspath
        File "nxdrive\utils.py", line 520, in safe_long_path
        File "nxdrive\utils.py", line 428, in normalized_path
        File "pathlib.py", line 1141, in resolve
        File "pathlib.py", line 193, in resolve
      
      Pair error
      

      Pathlib.Path.resolve() will raise a PermissionError when the file is opened elsewhere. This is not convenient as we only want to get the full path (without any action).
      We could fallback on using pathlib.Path.absolute() is that case. This may be problematic when using symlinks, but as of now there is no such files in Drive.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours
                2h