mHandler.post(new Runnable() {\r
@Override\r
public void run() {\r
+ // undo the local rename\r
+ if (mNew.isDown()) {\r
+ File f = new File(mNew.getStoragePath());\r
+ if (!f.renameTo(new File(mOld.getStoragePath()))) {\r
+ // the local rename undoing failed; last chance: save the new local storage path in the old file\r
+ mFile.setStoragePath(mNew.getStoragePath());\r
+ FileDataStorageManager fdsm = new FileDataStorageManager(mAccount, getActivity().getContentResolver());\r
+ fdsm.saveFile(mFile);\r
+ }\r
+ }\r
boolean inDisplayActivity = getActivity() instanceof FileDisplayActivity;\r
getActivity().dismissDialog((inDisplayActivity)? FileDisplayActivity.DIALOG_SHORT_WAIT : FileDetailActivity.DIALOG_SHORT_WAIT);\r
try {\r