mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-11 08:29:25 +00:00
[Support] Make sure LockFileManager works correctly with relative paths.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204426 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
#include "llvm/ADT/StringExtras.h"
|
||||
#include "llvm/Support/FileSystem.h"
|
||||
#include "llvm/Support/MemoryBuffer.h"
|
||||
#include "llvm/Support/Path.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
@@ -115,7 +116,8 @@ LockFileManager::LockFileManager(StringRef FileName)
|
||||
while (1) {
|
||||
// Create a link from the lock file name. If this succeeds, we're done.
|
||||
error_code EC =
|
||||
sys::fs::create_link(UniqueLockFileName.str(), LockFileName.str());
|
||||
sys::fs::create_link(sys::path::filename(UniqueLockFileName.str()),
|
||||
LockFileName.str());
|
||||
if (EC == errc::success)
|
||||
return;
|
||||
|
||||
|
Reference in New Issue
Block a user