-
Type: Bug
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: 9.10
-
Fix Version/s: 9.10-HF28, 10.10-HF01, 11.1, 2021.0
-
Component/s: Nuxeo Drive
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