Skip to content

Commit 610efd0

Browse files
committed
Tweak removeFilePathRecursively handling of empty path
1 parent 1aa344c commit 610efd0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/main/java/picoded/dstack/mongodb/MongoDB_FileWorkspaceMap.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ protected void removeFilePathRecursively(String oid, String path) {
261261
// Lets build the query for the "root file"
262262
Bson query = null;
263263

264-
if( path == null ) {
264+
if( path == null || path.equals("/") || path.isEmpty() ) {
265265
// Remove everything under the oid
266266
query = Filters.eq("metadata._oid", oid);
267267
} else {

0 commit comments

Comments
 (0)