Sync-in · Sovereign platform for file storage, sharing, synchronization, and collaboration.
TypeScript cloud-alternativecollaborationcollaborative-editingdropboxfile-serverfile-sharingfile-storagefile-syncfull-text-searchhomelabnextcloudon-premiseopen-sourceprivacy-firstprivate-cloudrealtimesecureself-hostedstorage-serverwebdav
fix(frontend:spaces): prevent false positives when checking external location
johavenf1fdd0d4088e
diff --git a/frontend/src/app/applications/spaces/components/dialogs/space-root-path-dialog.component.ts b/frontend/src/app/applications/spaces/components/dialogs/space-root-path-dialog.component.tsindex 8f360f76..44cef335 100644--- a/frontend/src/app/applications/spaces/components/dialogs/space-root-path-dialog.component.ts+++ b/frontend/src/app/applications/spaces/components/dialogs/space-root-path-dialog.component.ts@@ -63,7 +63,8 @@ export class SpaceRootPathDialogComponent implements OnInit {this.newSpaceRoot.externalPath = '/' + this.newSpaceRoot.externalPath}for (const root of this.currentRoots) {- if (this.newSpaceRoot.externalPath.startsWith(root.externalPath)) {+ const normalizedRoot = root.externalPath[root.externalPath.length - 1] === '/' ? root.externalPath : `${root.externalPath}/`+ if (this.newSpaceRoot.externalPath.startsWith(normalizedRoot)) {this.rootPathIsValid = falsethis.error = 'Parent location already exists in files'return