projects
/
pub
/
Android
/
ownCloud.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix crash when deleting used account
[pub/Android/ownCloud.git]
/
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
7757551
..
ee874d0
100644
(file)
--- a/
src/eu/alefzero/owncloud/datamodel/FileDataStorageManager.java
+++ b/
src/eu/alefzero/owncloud/datamodel/FileDataStorageManager.java
@@
-98,7
+98,11
@@
public class FileDataStorageManager implements DataStorageManager {
cv.put(ProviderTableMeta.FILE_ACCOUNT_OWNER, mAccount.name);
if (fileExists(file.getPath())) {
cv.put(ProviderTableMeta.FILE_ACCOUNT_OWNER, mAccount.name);
if (fileExists(file.getPath())) {
- file.setFileId(getFileByPath(file.getPath()).getFileId());
+ OCFile tmpfile = getFileByPath(file.getPath());
+ file.setStoragePath(tmpfile.getStoragePath());
+ cv.put(ProviderTableMeta.FILE_STORAGE_PATH, file.getStoragePath());
+ file.setFileId(tmpfile.getFileId());
+
overriden = true;
if (getContentResolver() != null) {
getContentResolver().update(ProviderTableMeta.CONTENT_URI,
overriden = true;
if (getContentResolver() != null) {
getContentResolver().update(ProviderTableMeta.CONTENT_URI,