This repository was archived by the owner on Feb 5, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change
1
+ ; RUN: touch %t.manifest
2
+ ; RUN: echo "1 24 \"%t.manifest\"" > %t.rc
3
+ ; RUN: llvm-rc %t.rc
Original file line number Diff line number Diff line change @@ -1502,6 +1502,10 @@ ResourceFileWriter::loadFile(StringRef File) const {
1502
1502
SmallString<128 > Cwd;
1503
1503
std::unique_ptr<MemoryBuffer> Result;
1504
1504
1505
+ // 0. The file path is absolute and the file exists.
1506
+ if (sys::path::is_absolute (File))
1507
+ return errorOrToExpected (MemoryBuffer::getFile (File, -1 , false ));
1508
+
1505
1509
// 1. The current working directory.
1506
1510
sys::fs::current_path (Cwd);
1507
1511
Path.assign (Cwd.begin (), Cwd.end ());
@@ -1510,8 +1514,7 @@ ResourceFileWriter::loadFile(StringRef File) const {
1510
1514
return errorOrToExpected (MemoryBuffer::getFile (Path, -1 , false ));
1511
1515
1512
1516
// 2. The directory of the input resource file, if it is different from the
1513
- // current
1514
- // working directory.
1517
+ // current working directory.
1515
1518
StringRef InputFileDir = sys::path::parent_path (Params.InputFilePath );
1516
1519
Path.assign (InputFileDir.begin (), InputFileDir.end ());
1517
1520
sys::path::append (Path, File);
You can’t perform that action at this time.
0 commit comments