aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2014-11-14 13:57:41 -0800
committerScott Jackson <daneren2005@gmail.com>2014-11-14 13:57:41 -0800
commit0051b4ada72132a024dd7e0dca2a4db3fb175dc1 (patch)
tree5efcf17bda195097b24068024dd843bbc739dc71
parent8d74b4f9bc2f85a09f4a26e671a428f889e83ea5 (diff)
downloaddsub-0051b4ada72132a024dd7e0dca2a4db3fb175dc1.tar.gz
dsub-0051b4ada72132a024dd7e0dca2a4db3fb175dc1.tar.bz2
dsub-0051b4ada72132a024dd7e0dca2a4db3fb175dc1.zip
Don't try to unpin a song which isn't actually pinned
-rw-r--r--src/github/daneren2005/dsub/util/FileUtil.java5
1 files changed, 5 insertions, 0 deletions
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()));