attempt to get the move functionality not to hang on Mac by 1. having the while loop wait for 200 microseconds, and 2. making the status variable volatile.

This commit is contained in:
Mitchell Livingston 2009-11-01 21:56:50 +00:00
parent 296411e093
commit a03dd39510
1 changed files with 3 additions and 3 deletions

View File

@ -457,10 +457,11 @@ int trashDataFile(const char * filename)
return;
}
int status;
volatile int status;
tr_torrentSetLocation(fHandle, [folder UTF8String], YES, NULL, &status);
while (status == TR_LOC_MOVING); //block while moving (for now)
while (status == TR_LOC_MOVING)
sleep(1); //block while moving (for now)
if (status == TR_LOC_DONE)
[[NSNotificationCenter defaultCenter] postNotificationName: @"UpdateStats" object: nil];
@ -1413,7 +1414,6 @@ int trashDataFile(const char * filename)
if (currentLocation)
{
[self setTimeMachineExclude: YES forPath: currentLocation];
[fTimeMachineExclude release];
fTimeMachineExclude = [currentLocation retain];
}
}