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

Force re-download if a local file does not exist anymore but it is still referenced in the database

    XMLWordPrintable

    Details

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

      Description

      Issues

      Sentry Issue: NUXEO-DRIVE-TE

      FileNotFoundError: [Errno 2] No such file or directory: "\\\\?\\C:\\Users\\USER\\Documents\\Nuxeo Drive\\FILE.docx"
      (1 additional frame(s) were not displayed)
      ...
        File "nxdrive\engine\processor.py", line 1153, in _synchronize_remotely_created
        File "nxdrive\engine\processor.py", line 1220, in _create_remotely
        File "nxdrive\engine\processor.py", line 966, in _download_content
        File "shutil.py", line 245, in copy
        File "shutil.py", line 120, in copyfile
      
      Unknown error
      

      When syncing a remotely created file, we first check if that file is already downloaded elsewhere (to improve network bandwith and Drive work).
      When checking the local file, it happens that sometimes it is in the database but not on the hard drive anymore.

      Sentry Issue: NUXEO-DRIVE-1R0

      FileNotFoundError: [Errno 2] No such file or directory: '\\\\?\\C:\\Users\\USER\\Documents\\Nuxeo Drive\\FILE.doc'
      (4 additional frame(s) were not displayed)
      ...
        File "nxdrive\direct_edit.py", line 443, in edit
        File "nxdrive\direct_edit.py", line 392, in _prepare_edit
        File "nxdrive\direct_edit.py", line 270, in _download
        File "shutil.py", line 245, in copy
        File "shutil.py", line 120, in copyfile
      

      Same behavior when DirectEdit'ing a file that may be already synced.

      Fix

      In that case, just skip the FileNotFoundError and force the re-download of the file.

        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 - 1 hour
                1h