X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/d4f8391f509b4b211d6742db6db546b80e8277c7..a032bdeebc51a6e81d1bd5c558944f96fc55eacb:/src/eu/alefzero/owncloud/datamodel/FileDataStorageManager.java diff --git a/src/eu/alefzero/owncloud/datamodel/FileDataStorageManager.java b/src/eu/alefzero/owncloud/datamodel/FileDataStorageManager.java index e1b62ef7..43af7468 100644 --- a/src/eu/alefzero/owncloud/datamodel/FileDataStorageManager.java +++ b/src/eu/alefzero/owncloud/datamodel/FileDataStorageManager.java @@ -378,7 +378,7 @@ public class FileDataStorageManager implements DataStorageManager { if (file.getStoragePath() == null) { // try to find existing file and bind it with current account File sdCard = Environment.getExternalStorageDirectory(); - File f = new File(sdCard.getAbsolutePath() + "/owncloud/" + mAccount.name + file.getURLDecodedRemotePath()); + File f = new File(sdCard.getAbsolutePath() + "/owncloud/" + mAccount.name + file.getRemotePath()); if (f.exists()) file.setStoragePath(f.getAbsolutePath()); } @@ -412,7 +412,7 @@ public class FileDataStorageManager implements DataStorageManager { ProviderTableMeta.FILE_ACCOUNT_OWNER+"=?", new String[]{mAccount.name}); } - if (file.getStoragePath() != null) { + if (file.isDown()) { new File(file.getStoragePath()).delete(); } }