=> e48ccd9e9681d7fc5d73ad0479898282f68d78fa
[1mdiff --git a/src/commandline.c b/src/commandline.c[m [1mindex bd3b43b..c82cf03 100644[m [1m--- a/src/commandline.c[m [1m+++ b/src/commandline.c[m [36m@@ -32,6 +32,10 @@[m [mSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m [m #include[m [m [32m+[m[32m#if defined (iPlatformLinux)[m [32m+[m[32m# include [m [32m+[m[32m#endif[m [32m+[m iDeclareType(DefinedArg)[m iDeclareStaticClass(DefinedArg)[m [m [36m@@ -153,8 +157,9 @@[m [miString *readSymlinkTarget_(const iString *path) {[m resize_Block(buf, 64);[m for (;;) {[m ssize_t rc = readlink(cstr_String(path), data_Block(buf), size_Block(buf));[m [31m- if (rc == -1) {[m [31m- break; /* failure */[m [32m+[m[32m if (rc == -1) { /* failure */[m [32m+[m[32m delete_String(target);[m [32m+[m[32m return NULL;[m } else if (rc <= size_Block(buf)) {[m break;[m }[m [36m@@ -185,6 +190,7 @@[m [mvoid init_CommandLine(iCommandLine *d, int argc, char **argv) {[m appendCStr_String(d->execPath, ".exe");[m }[m #else[m [32m+[m[32m d->execPath = NULL;[m # if defined (iPlatformLinux)[m if (access("/proc", F_OK) == 0) {[m /* The kernel provides a symbolic link to the executable's path. */[m [36m@@ -198,7 +204,9 @@[m [mvoid init_CommandLine(iCommandLine *d, int argc, char **argv) {[m /* TODO: This does not work if the executable was started via PATH. It[m would be more reliable to use platform-specific means to determine the[m path. See: https://stackoverflow.com/a/1024937 */[m [31m- d->execPath = makeAbsolute_Path(constFront_StringList(&d->args));[m [32m+[m[32m if (!d->execPath) {[m [32m+[m[32m d->execPath = makeAbsolute_Path(constFront_StringList(&d->args));[m [32m+[m[32m }[m #endif[m }[m [m
text/gemini; charset=utf-8
This content has been proxied by September (3851b).