]> git.tdb.fi Git - libs/core.git/blobdiff - source/fs/dir.cpp
Remove deprecated things
[libs/core.git] / source / fs / dir.cpp
index 8625b783ef464357439833a0d3685175ab40041a..7f81e4ea8301ef07ce7c4062bf65323de6f9dfc8 100644 (file)
@@ -37,17 +37,17 @@ const Path &get_bin_dir(const string &argv0)
        if(!(argv0==last_argv0))
        {
                Path exe;
-               if(argv0.find('/')==string::npos)
-               {
-                       const char *path = getenv("PATH");
-                       vector<string> dirs = split(path, ITEMSEP);
-                       for(vector<string>::const_iterator i=dirs.begin(); i!=dirs.end(); ++i)
-                               if(exists(Path(*i)/argv0))
-                               {
-                                       exe = realpath(Path(*i)/argv0);
-                                       break;
-                               }
-               }
+               if(argv0.find(DIRSEP)==string::npos)
+                       if(const char *path = getenv("PATH"))
+                       {
+                               vector<string> dirs = split(path, ITEMSEP);
+                               for(vector<string>::const_iterator i=dirs.begin(); i!=dirs.end(); ++i)
+                                       if(exists(Path(*i)/argv0))
+                                       {
+                                               exe = realpath(Path(*i)/argv0);
+                                               break;
+                                       }
+                       }
 
                if(exe.empty())
                        exe = realpath(argv0);
@@ -130,11 +130,6 @@ list<string> list_filtered(const Path &path, const string &filter)
        return result;
 }
 
-Path get_sys_conf_dir(const string &)
-{
-       return get_sys_conf_dir();
-}
-
 Path get_sys_conf_dir()
 {
        const char *argv0 = Application::get_argv0();
@@ -154,11 +149,6 @@ Path get_sys_conf_dir()
                return dir;
 }
 
-Path get_sys_data_dir(const string &, const string &)
-{
-       return get_sys_data_dir();
-}
-
 Path get_sys_data_dir()
 {
        const char *argv0 = Application::get_argv0();
@@ -175,11 +165,6 @@ Path get_sys_data_dir()
                return dir;
 }
 
-Path get_sys_lib_dir(const string &, const string &)
-{
-       return get_sys_lib_dir();
-}
-
 Path get_sys_lib_dir()
 {
        const char *argv0 = Application::get_argv0();