mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-26 10:29:36 +00:00
Archive: Fix temp path names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123660 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3c00a83c33
commit
02e27ed21b
@ -364,8 +364,9 @@ Archive::writeToDisk(bool CreateSymbolTable, bool TruncateNames, bool Compress,
|
|||||||
// Create a temporary file to store the archive in
|
// Create a temporary file to store the archive in
|
||||||
SmallString<128> TempArchivePath;
|
SmallString<128> TempArchivePath;
|
||||||
int ArchFD;
|
int ArchFD;
|
||||||
if (error_code ec = sys::fs::unique_file("%%-%%-%%-%%" + archPath.str(),
|
if (error_code ec =
|
||||||
ArchFD, TempArchivePath)) {
|
sys::fs::unique_file("%%-%%-%%-%%-" + sys::path::filename(archPath.str()),
|
||||||
|
ArchFD, TempArchivePath)) {
|
||||||
if (ErrMsg) *ErrMsg = ec.message();
|
if (ErrMsg) *ErrMsg = ec.message();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -421,8 +422,9 @@ Archive::writeToDisk(bool CreateSymbolTable, bool TruncateNames, bool Compress,
|
|||||||
|
|
||||||
// Open another temporary file in order to avoid invalidating the
|
// Open another temporary file in order to avoid invalidating the
|
||||||
// mmapped data
|
// mmapped data
|
||||||
if (error_code ec = sys::fs::unique_file("%%-%%-%%-%%" + archPath.str(),
|
if (error_code ec =
|
||||||
ArchFD, TempArchiveWithSymbolTablePath)) {
|
sys::fs::unique_file("%%-%%-%%-%%-" + sys::path::filename(archPath.str()),
|
||||||
|
ArchFD, TempArchiveWithSymbolTablePath)) {
|
||||||
if (ErrMsg) *ErrMsg = ec.message();
|
if (ErrMsg) *ErrMsg = ec.message();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user