Show More
@@ -1,5 +1,6 b'' | |||
|
1 | 1 | #include "pyutil.h" |
|
2 | 2 | |
|
3 | #include <iostream> | |
|
3 | 4 | #include <string> |
|
4 | 5 | |
|
5 | 6 | namespace contrib |
@@ -24,7 +25,11 b' void initpy(const char *cselfpath)' | |||
|
24 | 25 | auto pos = selfpath.rfind("/"); |
|
25 | 26 | if (pos == std::string::npos) { |
|
26 | 27 | char wd[8192]; |
|
27 |
getcwd(wd, 8192) |
|
|
28 | if (!getcwd(wd, 8192)) { | |
|
29 | std::cerr << "Failed to call getcwd: errno " << errno | |
|
30 | << std::endl; | |
|
31 | exit(1); | |
|
32 | } | |
|
28 | 33 | pypath = std::string(wd) + subdir; |
|
29 | 34 | } else { |
|
30 | 35 | pypath = selfpath.substr(0, pos) + subdir; |
General Comments 0
You need to be logged in to leave comments.
Login now