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

Fix remote opening of a file after conflict is detected

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1.914
    • Fix Version/s: 2.1.1130
    • Component/s: None

      Description

      Steps:

      1. Launch Drive
      2. Login valid credentials
      3. Upload a text file and wait for sync completion
      4. Make conflict of the file
      5. Open conflict window
      6. Open remote

      Actual Result:
      The remote file is not opened.

      Expected Result:
      Remote file should be downloaded into the .nuxeo-drive/guid/ folder and open in text editor

      See this screenshot and those logs


      Exception raised in the logs:

      Exception in thread Thread-13:
      Traceback (most recent call last):
        File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 810, in __bootstrap_inner
          self.run()
        File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 763, in run
          self.__target(*self.__args, **self.__kwargs)
        File "/Users/ravindersinghl/Documents/NuxeoCode/NuxeoDriveOrg/nuxeo-drive/nuxeo-drive-client/nxdrive/engine/engine.py", line 321, in run
          doc_ref, filename=remote_name, user=self._remote_user)
      TypeError: edit() got an unexpected keyword argument 'filename'
      

      Root Cause detected by customer: Passing an 'filename' parameter, which is not part of definition

      engine.py

              def run():
                  self._manager.get_direct_edit().edit(self._server_url,
                                                      doc_ref, filename=remote_name, user=self._remote_user)
              self._edit_thread = Thread(target=run)
              self._edit_thread.start()
      

      direct_edit.py

          def edit(self, server_url, doc_id, user=None, download_url=None):
              try:
      

      Fix: Remove filename parameter
      engine.py

              def run():
                  self._manager.get_direct_edit().edit(self._server_url,
                                                      doc_ref, user=self._remote_user)
              self._edit_thread = Thread(target=run)
              self._edit_thread.start()
      

        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 - 16 minutes
                16m