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

Use os.path.realpath() instead of abspath()

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 4.5.0
    • Fix Version/s: 4.5.1
    • Component/s: Synchronizer

      Description

      os.path.abspath() does not resolve symlinks, and lot of tests are failing. I suspect the synchronization can have issues too.

      Here, master is at 131e30dfe16a23fcfa98639aced2b2e7d708a97b.

      $ git bisect start master release-4.4.5
      $ git bisect run python -m pytest -n1 tests/old_functional/test_direct_edit.py::TestDirectEdit::test_attachments
      # (...)
      fbe5393c3f070e89f52c616dc1f8466aa3618665 is the first bad commit
      commit fbe5393c3f070e89f52c616dc1f8466aa3618665
      Author: Mickaël Schoentgen <mschoentgen@nuxeo.com>
      Date:   Mon Oct 19 15:18:28 2020 +0200
      
          NXDRIVE-2319: Do not use the undocumented and unreliable Path.absolute() method
      
       docs/changes/4.4.6.md           |  2 ++
       nxdrive/client/local/base.py    | 19 ++++---------------
       nxdrive/utils.py                | 13 ++++---------
       tests/unit/test_local_client.py | 18 ------------------
       tests/unit/test_utils.py        | 15 ---------------
       5 files changed, 10 insertions(+), 57 deletions(-)
      bisect run success
      

      NXDRIVE-2319 introduced the regression.

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