X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/2a04c6ae5da009baa78c243606297b5a039925c2..f0fb5848f2d5d31b2576e4f6144ccb8a9628f91f:/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 43af7468..b6fa918c 100644 --- a/src/eu/alefzero/owncloud/datamodel/FileDataStorageManager.java +++ b/src/eu/alefzero/owncloud/datamodel/FileDataStorageManager.java @@ -111,11 +111,12 @@ public class FileDataStorageManager implements DataStorageManager { cv.put(ProviderTableMeta.FILE_KEEP_IN_SYNC, file.keepInSync() ? 1 : 0); if (fileExists(file.getRemotePath())) { - OCFile tmpfile = getFileByPath(file.getRemotePath()); - file.setStoragePath(tmpfile.getStoragePath()); + OCFile oldFile = getFileByPath(file.getRemotePath()); + if (file.getStoragePath() == null && oldFile.getStoragePath() != null) + file.setStoragePath(oldFile.getStoragePath()); if (!file.isDirectory()); cv.put(ProviderTableMeta.FILE_STORAGE_PATH, file.getStoragePath()); - file.setFileId(tmpfile.getFileId()); + file.setFileId(oldFile.getFileId()); overriden = true; if (getContentResolver() != null) {