mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-23 17:15:33 +00:00
Merge pull request #1100 from bwidawsk/home
Support ~ in filename parsing
This commit is contained in:
commit
b3441935b1
5 changed files with 8 additions and 0 deletions
|
@ -651,6 +651,10 @@ void rewrite_filename(std::string &filename)
|
|||
filename = filename.substr(1, GetSize(filename)-2);
|
||||
if (filename.substr(0, 2) == "+/")
|
||||
filename = proc_share_dirname() + filename.substr(2);
|
||||
#ifndef _WIN32
|
||||
if (filename.substr(0, 2) == "~/")
|
||||
filename = filename.replace(0, 1, getenv("HOME"));
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef YOSYS_ENABLE_TCL
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue