From 0051b4ada72132a024dd7e0dca2a4db3fb175dc1 Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Fri, 14 Nov 2014 13:57:41 -0800 Subject: Don't try to unpin a song which isn't actually pinned --- src/github/daneren2005/dsub/util/FileUtil.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/github/daneren2005/dsub/util/FileUtil.java b/src/github/daneren2005/dsub/util/FileUtil.java index b8ab0f6d..7afeec93 100644 --- a/src/github/daneren2005/dsub/util/FileUtil.java +++ b/src/github/daneren2005/dsub/util/FileUtil.java @@ -438,6 +438,11 @@ public class FileUtil { } public static void unpinSong(Context context, File saveFile) { + // Don't try to unpin a song which isn't actually pinned + if(saveFile.getName().contains(".complete")) { + return; + } + // Unpin file, rename to .complete File completeFile = new File(saveFile.getParent(), FileUtil.getBaseName(saveFile.getName()) + ".complete." + FileUtil.getExtension(saveFile.getName())); -- cgit v1.2.3