From 91bfd2f1813458cab64f6c40b3f5c22d32b802f7 Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Mon, 9 Feb 2015 16:01:20 -0800 Subject: #446 Delete parent folder if we deleted the last song in a folder --- src/github/daneren2005/dsub/service/DownloadFile.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/github/daneren2005/dsub/service/DownloadFile.java b/src/github/daneren2005/dsub/service/DownloadFile.java index 04dc537a..505e4a6d 100644 --- a/src/github/daneren2005/dsub/service/DownloadFile.java +++ b/src/github/daneren2005/dsub/service/DownloadFile.java @@ -267,9 +267,11 @@ public class DownloadFile implements BufferFile { deleteFromStore(); // Delete all possible versions of the file + File parent = partialFile.getParentFile(); Util.delete(partialFile); Util.delete(completeFile); Util.delete(saveFile); + FileUtil.deleteEmptyDir(parent); } public void unpin() { -- cgit v1.2.3