Skip to content

Commit f236404

Browse files
authored
Merge pull request #779 from bvernoux/patch-2
Update scopehal.cpp FindDataFile to use relative path when possible
2 parents 99937a4 + 9147929 commit f236404

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

scopehal/scopehal.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -767,6 +767,12 @@ vector<uint32_t> ReadDataFileUint32(const string& relpath)
767767
*/
768768
string FindDataFile(const string& relpath)
769769
{
770+
FILE* fp = fopen(relpath.c_str(), "rb");
771+
if(fp)
772+
{
773+
fclose(fp);
774+
return relpath;
775+
}
770776
for(auto dir : g_searchPaths)
771777
{
772778
string path = dir + "/" + relpath;

0 commit comments

Comments
 (0)