dont loose keep in sync state when syncing
authorBartek Przybylski <bart.p.pl@gmail.com>
Mon, 9 Jul 2012 15:16:56 +0000 (17:16 +0200)
committerBartek Przybylski <bart.p.pl@gmail.com>
Mon, 9 Jul 2012 15:16:56 +0000 (17:16 +0200)
AndroidManifest.xml
src/eu/alefzero/owncloud/syncadapter/FileSyncAdapter.java

index 6639300..0372a96 100644 (file)
@@ -18,7 +18,7 @@
  -->\r
 <manifest package="eu.alefzero.owncloud"\r
     android:versionCode="1"\r
-    android:versionName="0.1.153B" xmlns:android="http://schemas.android.com/apk/res/android">\r
+    android:versionName="0.1.154B" xmlns:android="http://schemas.android.com/apk/res/android">\r
 \r
     <uses-permission android:name="android.permission.GET_ACCOUNTS" />\r
     <uses-permission android:name="android.permission.USE_CREDENTIALS" />\r
index 73b74ed..1dcc745 100644 (file)
@@ -128,9 +128,12 @@ public class FileSyncAdapter extends AbstractOwnCloudSyncAdapter {
                     intent.putExtra(FileDownloader.EXTRA_ACCOUNT, getAccount());\r
                     intent.putExtra(FileDownloader.EXTRA_FILE_PATH, file.getURLDecodedRemotePath());\r
                     intent.putExtra(FileDownloader.EXTRA_REMOTE_PATH, file.getRemotePath());\r
+                    intent.putExtra(FileDownloader.EXTRA_FILE_SIZE, file.getFileLength());\r
                     file.setKeepInSync(true);\r
                     getContext().startService(intent);\r
                 }\r
+                if (getStorageManager().getFileByPath(file.getRemotePath()) != null)\r
+                    file.setKeepInSync(getStorageManager().getFileByPath(file.getRemotePath()).keepInSync());\r
                 getStorageManager().saveFile(file);\r
                 if (parentId == 0)\r
                     parentId = file.getFileId();\r