]> git.tdb.fi Git - libs/core.git/commitdiff
Use correct directory separator to check for absolute binary path
authorMikko Rasa <tdb@tdb.fi>
Sun, 22 Aug 2021 09:33:32 +0000 (12:33 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sun, 22 Aug 2021 09:33:32 +0000 (12:33 +0300)
source/fs/dir.cpp

index 8625b783ef464357439833a0d3685175ab40041a..be471628ceac105de600b341107ff2064a0bc090 100644 (file)
@@ -37,7 +37,7 @@ const Path &get_bin_dir(const string &argv0)
        if(!(argv0==last_argv0))
        {
                Path exe;
-               if(argv0.find('/')==string::npos)
+               if(argv0.find(DIRSEP)==string::npos)
                {
                        const char *path = getenv("PATH");
                        vector<string> dirs = split(path, ITEMSEP);