Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2050,6 +2050,13 @@ protected Answer deleteSnapshot(final DeleteCommand cmd) {
s_logger.warn(details);
return new Answer(cmd, false, details);
}

// delete the directory if it is empty
if (snapshotDir.isDirectory() && snapshotDir.list().length == 0 && !snapshotDir.delete()) {
details = String.format("Unable to delete directory [%s] at path [%s].", snapshotDir.getName(), snapshotPath);
s_logger.debug(details);
return new Answer(cmd, false, details);
Comment thread
harikrishna-patnala marked this conversation as resolved.
}
return new Answer(cmd, true, null);
} else if (dstore instanceof S3TO) {
final S3TO s3 = (S3TO)dstore;
Expand Down