NetworkAgent.Post(new CloudDeleteAction(accountInfo, info, fileState));
break;
case FileStatus.Renamed:
+ if (state.OldPath == null)
+ {
+ //We reach this point only if the app closed before propagating a rename to the server
+ Log.WarnFormat("Unfinished rename [{0}]",state.Path);
+ StatusKeeper.SetFileState(state.Path,FileStatus.Conflict,FileOverlayStatus.Conflict, "Rename without old path");
+ break;
+ }
FileSystemInfo oldInfo = Directory.Exists(state.OldPath)
? (FileSystemInfo) new DirectoryInfo(state.OldPath)
: new FileInfo(state.OldPath);
public void RestartInterruptedFiles(AccountInfo accountInfo)
{
-
+ StatusKeeper.CleanupOrphanStates();
using (log4net.ThreadContext.Stacks["Operation"].Push("RestartInterrupted"))
{
if (Log.IsDebugEnabled)
var account = accountInfo;
var pendingEntries = (from state in FileState.Queryable
where state.FileStatus != FileStatus.Unchanged &&
+ state.FileStatus != FileStatus.Forbidden &&
+ state.FileStatus != FileStatus.Conflict &&
!state.FilePath.StartsWith(cachePath) &&
!state.FilePath.EndsWith(".ignore") &&
state.FilePath.StartsWith(account.AccountPath)