On Linux, TempOutputFileFor::ReplaceFile returns a wrong status, indicating the replacement has failed when it has not. This leads to a misleading error message displayed to user on every po file save.
The cause is in the verification of the return codes of chown/chmod. chown and chmod return a non-zero integer value when an error occurs. A non-zero value is considered as a boolean true.
This commit fixes the logic error; It explicitly compares the returned integer value to another integer to avoid confusion.
On Linux,
TempOutputFileFor::ReplaceFile
returns a wrong status, indicating the replacement has failed when it has not. This leads to a misleading error message displayed to user on every po file save.The cause is in the verification of the return codes of
chown
/chmod
.chown
andchmod
return a non-zero integer value when an error occurs. A non-zero value is considered as a booleantrue
.This commit fixes the logic error; It explicitly compares the returned integer value to another integer to avoid confusion.