Skip to content

Commit 7e16f66

Browse files
committed
Fix test 3
1 parent f3c3899 commit 7e16f66

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/main/java/org/commonjava/service/storage/controller/StorageController.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@
4747
import static org.commonjava.service.storage.util.Utils.getDuration;
4848
import static org.commonjava.service.storage.util.Utils.sort;
4949
import static org.commonjava.storage.pathmapped.util.PathMapUtils.ROOT_DIR;
50-
import static org.commonjava.storage.pathmapped.util.PathMapUtils.normalizeParentPath;
5150

5251
@Startup
5352
@ApplicationScoped
@@ -289,8 +288,8 @@ public BatchDeleteResult cleanupEmptyFolders(String filesystem, Collection<Strin
289288
if (paths != null) {
290289
for (String path : paths) {
291290
String current = path;
292-
while (current != null && !current.isEmpty() && !current.equals("/") && !current.equals(".")) {
293-
allCandidates.add(current);
291+
while (current != null && !current.isEmpty() && !current.equals("/")) {
292+
allCandidates.add(normalizeFolderPath(current));
294293
current = getParentPath(current);
295294
}
296295
}
@@ -315,7 +314,7 @@ public BatchDeleteResult cleanupEmptyFolders(String filesystem, Collection<Strin
315314
}
316315
String[] contents = fileManager.list(filesystem, folder);
317316
if (contents == null || contents.length == 0) {
318-
boolean deleted = fileManager.delete(filesystem, normalizeFolderPath(folder));
317+
boolean deleted = fileManager.delete(filesystem, folder);
319318
if (deleted) {
320319
succeeded.add(folder);
321320
logger.debug("Folder deleted: {} in filesystem: {}", folder, filesystem);

0 commit comments

Comments
 (0)