Fixed null pointer in synchronization
[pub/Android/ownCloud.git] / src / eu / alefzero / owncloud / syncadapter / FileSyncAdapter.java
index 61975dd..9dfa8f6 100644 (file)
@@ -220,7 +220,7 @@ public class FileSyncAdapter extends AbstractOwnCloudSyncAdapter {
             for (int i=0; i < files.size() && !mCancellation; i++) {\r
                 OCFile newFile = files.get(i);\r
                 if (newFile.getMimetype().equals("DIR")) {\r
-                    fetchData(getUri().toString() + WebdavUtils.encode(newFile.getRemotePath()), syncResult, newFile.getFileId());\r
+                    fetchData(getUri().toString() + WebdavUtils.encodePath(newFile.getRemotePath()), syncResult, newFile.getFileId());\r
                 }\r
             }\r
             if (mCancellation) Log.d(TAG, "Leaving " + uri + " because cancellation request");\r