- if (file.keepInSync()) {
- //disableObservance(file); // first disable observer so we won't get file upload right after download
- // // now, the FileDownloader service sends a broadcast before start a download; the FileObserverService is listening for it
- //requestFileSynchronization(file, oldFile, client);
- SynchronizeFileOperation operation = new SynchronizeFileOperation( oldFile,
- file,
- mStorageManager,
- mAccount,
- true,
- false,
- mContext
- );
- filesToSyncContents.add(operation);
+ file.setStoragePath(oldFile.getStoragePath());
+ }
+
+ /// scan default location if local copy of file is not linked in OCFile instance
+ if (file.getStoragePath() == null && !file.isDirectory()) {
+ File f = new File(FileStorageUtils.getDefaultSavePathFor(mAccount.name, file));
+ if (f.exists()) {
+ file.setStoragePath(f.getAbsolutePath());
+ file.setLastSyncDateForData(f.lastModified());