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

Avoid renaming banned files

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 4.0.4
    • Fix Version/s: 4.1.0
    • Component/s: Local watcher
    • Environment:
      macOS

      Description

      When modifying Icon\r , an error is raised. It is due to the forced renaming of the normalization. We need to avoid it on banned files.

      2019-02-07 14:30:47 50165 123145584779264 TRACE    nxdrive.engine.watcher.local_watcher Queueing watchdog: <FileCreatedEvent: src_path='/Users/bob/Nuxeo Drive/Icon\r'>
      2019-02-07 14:30:47 50165 123145584779264 TRACE    nxdrive.engine.watcher.local_watcher Queueing watchdog: <DirModifiedEvent: src_path='/Users/bob/Nuxeo Drive'>
      2019-02-07 14:30:47 50165 123145572122624 DEBUG    nxdrive.engine.watcher.local_watcher Handling watchdog event [created] on '/Users/bob/Nuxeo Drive/Icon\r'
      2019-02-07 14:30:47 50165 123145572122624 DEBUG    nxdrive.utils      Forcing space normalization: PosixPath('/Users/bob/Nuxeo Drive/Icon\r') -> PosixPath('/Users/bob/Nuxeo Drive/Icon')
      2019-02-07 14:30:47 50165 123145572122624 ERROR    nxdrive.engine.watcher.local_watcher Watchdog exception
      Traceback (most recent call last):
        File "engine/watcher/local_watcher.py", line 932, in handle_watchdog_event
          src_path = normalize(evt.src_path)
        File "utils.py", line 443, in normalize_event_filename
          path.rename(stripped)
        File "lib/python3.6/pathlib.py", line 1309, in rename
          self._accessor.rename(self, target)
        File "lib/python3.6/pathlib.py", line 393, in wrapped
          return strfunc(str(pathobjA), str(pathobjB), *args)
      PermissionError: [Errno 13] Permission denied: '/Users/bob/Nuxeo Drive/Icon\r' -> '/Users/bob/Nuxeo Drive/Icon'
      

        Attachments

          Issue Links

            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