X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fconfigreader.cpp;h=51045ef5859a8dba15f215e3666849a43f7e9b64;hb=48045988a48a738a1ffa183fdc1e335a431312a8;hp=0fcf88e9da204a7d6ba25506575d54e38d7c4a84;hpb=1735fc95bba84044d43d4490bd5916d0a52eb876;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/configreader.cpp b/src/configreader.cpp index 0fcf88e9d..51045ef58 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -2046,64 +2046,6 @@ char* ServerConfig::CleanFilename(char* name) } -bool ServerConfig::DirValid(const char* dirandfile) -{ -#ifdef WINDOWS - return true; -#else - - char work[1024]; - char buffer[1024]; - char otherdir[1024]; - int p; - - strlcpy(work, dirandfile, 1024); - p = strlen(work); - - // we just want the dir - while (*work) - { - if (work[p] == '/') - { - work[p] = '\0'; - break; - } - - work[p--] = '\0'; - } - - // Get the current working directory - if (getcwd(buffer, 1024 ) == NULL ) - return false; - - if (chdir(work) == -1) - return false; - - if (getcwd(otherdir, 1024 ) == NULL ) - return false; - - if (chdir(buffer) == -1) - return false; - - size_t t = strlen(work); - - if (strlen(otherdir) >= t) - { - otherdir[t] = '\0'; - if (!strcmp(otherdir,work)) - { - return true; - } - - return false; - } - else - { - return false; - } -#endif -} - std::string ServerConfig::GetFullProgDir() { char buffer[PATH_MAX];