File tree Expand file tree Collapse file tree
src/main/java/picoded/dstack/mongodb Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ public void systemSetup() {
108108 // We insert a "root" object, to ensure the tables are initialized
109109 // ---
110110 if (!fullRawPathExist ("root" )) {
111- setupAnchorFile_withFullRawPath ("root " , "root" , "root" );
111+ setupAnchorFile_withFullRawPath ("" , "root" , "root" );
112112 }
113113
114114 // Lets setup the index for the metadata fields (which is not enabled by default)
@@ -926,7 +926,12 @@ public Set<String> keySet() {
926926 // Lets iterate the search
927927 try (MongoCursor <String > cursor = search .iterator ()) {
928928 while (cursor .hasNext ()) {
929- ret .add (cursor .next ());
929+ String oid = cursor .next ();
930+ // older version of DStack initialized a "root" folder, which is invalid
931+ if ( oid == null || oid .equals ("root" ) || oid .equals ("" ) ) {
932+ continue ;
933+ }
934+ ret .add (oid );
930935 }
931936 }
932937
You can’t perform that action at this time.
0 commit comments