mirror of
https://github.com/transmission/transmission
synced 2025-03-12 15:14:12 +00:00
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:
parent
296411e093
commit
a03dd39510
1 changed files with 3 additions and 3 deletions
|
@ -457,10 +457,11 @@ int trashDataFile(const char * filename)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int status;
|
volatile int status;
|
||||||
tr_torrentSetLocation(fHandle, [folder UTF8String], YES, NULL, &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)
|
if (status == TR_LOC_DONE)
|
||||||
[[NSNotificationCenter defaultCenter] postNotificationName: @"UpdateStats" object: nil];
|
[[NSNotificationCenter defaultCenter] postNotificationName: @"UpdateStats" object: nil];
|
||||||
|
@ -1413,7 +1414,6 @@ int trashDataFile(const char * filename)
|
||||||
if (currentLocation)
|
if (currentLocation)
|
||||||
{
|
{
|
||||||
[self setTimeMachineExclude: YES forPath: currentLocation];
|
[self setTimeMachineExclude: YES forPath: currentLocation];
|
||||||
[fTimeMachineExclude release];
|
|
||||||
fTimeMachineExclude = [currentLocation retain];
|
fTimeMachineExclude = [currentLocation retain];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue