From 122342db1191cc54f3af0b16627fff28bfeef2a4 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Sat, 11 Apr 2015 12:39:19 +0200 Subject: [PATCH] ignore partial downloads in list, cleanup partials --- static/js/fs.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/static/js/fs.js b/static/js/fs.js index 32712a962..6a897dda3 100644 --- a/static/js/fs.js +++ b/static/js/fs.js @@ -16,7 +16,7 @@ pandora.fs = (function() { that.fs = fs; that.fs.root.createReader().readEntries(function(results) { results.forEach(function(entry) { - if (entry.isFile) { + if (entry.isFile && !Ox.startsWith(entry.name, 'partial::')) { that.local[entry.name] = entry.toURL(); } }); @@ -140,6 +140,10 @@ pandora.fs = (function() { }, function() { // file not found ++done == count && callback(); }); + // remove partial file too + that.fs.root.getFile('partial::' + name, {create: false}, function(fileEntry) { + fileEntry.remove(function(e) {}); + }); }); }); });