Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-26540

Do not compute child sync roots when the target document is a version

    XMLWordPrintable

    Details

    • Backlog priority:
      500
    • Sprint:
      nxsupport 11.1.1, nxsupport 11.1.2
    • Story Points:
      1

      Description

      NuxeoDriveFileSystemDeletionListener#getChildSyncRoots runs the following query when permissions are changed:

          protected List<DocumentModel> getChildSyncRoots(DocumentModel doc, CoreSession session) {
              String nxql = "SELECT * FROM Document WHERE ecm:mixinType = '" + NuxeoDriveManagerImpl.NUXEO_DRIVE_FACET
                      + "' AND ecm:currentLifeCycleState != 'deleted' AND ecm:isVersion = 0 AND ecm:path STARTSWITH "
                      + NXQL.escapeString(doc.getPathAsString());
              return session.query(nxql);
          }
      

      The problem is that a version is a placeless document and therefore doc.getPathAsString() return null, and this call ends with a NullPointerException.

      If the case where the current document is a version, this call should skip the execution of the query

        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 - 5 hours, 10 minutes
                5h 10m