X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/d0b7df16e7db7aacfeab0685eb9ceaf6b58fbc08..60d0a121b7ccffd0d1668f771ba4061ab0254b2e:/src/com/owncloud/android/datamodel/FileDataStorageManager.java diff --git a/src/com/owncloud/android/datamodel/FileDataStorageManager.java b/src/com/owncloud/android/datamodel/FileDataStorageManager.java index be016555..4ed425e1 100644 --- a/src/com/owncloud/android/datamodel/FileDataStorageManager.java +++ b/src/com/owncloud/android/datamodel/FileDataStorageManager.java @@ -533,12 +533,12 @@ public class FileDataStorageManager implements DataStorageManager { /// 2. prepare a batch of update operations to change all the descendants ArrayList operations = new ArrayList(c.getCount()); - ContentValues cv = new ContentValues(); int lengthOfOldPath = dir.getRemotePath().length(); String defaultSavePath = FileDownloader.getSavePath(mAccount.name); int lengthOfOldStoragePath = defaultSavePath.length() + lengthOfOldPath; if (c.moveToFirst()) { do { + ContentValues cv = new ContentValues(); // don't take the constructor out of the loop and clear the object OCFile child = createFileInstance(c); cv.put(ProviderTableMeta.FILE_PATH, newPath + child.getRemotePath().substring(lengthOfOldPath)); if (child.getStoragePath() != null && child.getStoragePath().startsWith(defaultSavePath)) {