mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-01 15:17:25 +00:00
Always set the mode.
This matches GNU ar behavior. Also remove the now unused getFileStatus method. Not sure how to add a test, it would have to run ls -l or something like that. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184337 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -440,12 +440,18 @@ doExtract(std::string* ErrMsg) {
|
||||
file.write(data,len);
|
||||
file.close();
|
||||
|
||||
sys::PathWithStatus PWS(I->getPath());
|
||||
sys::FileStatus Status = *PWS.getFileStatus();
|
||||
|
||||
// Retain the original mode.
|
||||
Status.mode = I->getMode();
|
||||
|
||||
// If we're supposed to retain the original modification times, etc. do so
|
||||
// now.
|
||||
if (OriginalDates) {
|
||||
sys::PathWithStatus PWS(I->getPath());
|
||||
PWS.setStatusInfoOnDisk(I->getFileStatus());
|
||||
}
|
||||
if (OriginalDates)
|
||||
Status.modTime = I->getModTime();
|
||||
|
||||
PWS.setStatusInfoOnDisk(Status);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user