diff options
| author | omegadox <omegadox@gmail.com> | 2009-03-28 08:57:34 +0000 |
|---|---|---|
| committer | omegadox <omegadox@gmail.com> | 2009-03-28 08:57:34 +0000 |
| commit | eb0cab140f4aa4e17cb60e39e7467a36d6bfa97d (patch) | |
| tree | f725c5354346506a0491211b87e1d59cb62b7fdc /Source/Core/Common/Src/FileUtil.cpp | |
| parent | bdabcd4bf5a460eaed21571b17ecd48b8f8c01aa (diff) | |
Some code cleanup
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2768 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/Common/Src/FileUtil.cpp')
| -rw-r--r-- | Source/Core/Common/Src/FileUtil.cpp | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/Source/Core/Common/Src/FileUtil.cpp b/Source/Core/Common/Src/FileUtil.cpp index b4ab4b4b00..fada9db8e8 100644 --- a/Source/Core/Common/Src/FileUtil.cpp +++ b/Source/Core/Common/Src/FileUtil.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2003-2008 Dolphin Project. +// Copyright (C) 2003-2009 Dolphin Project. // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -45,11 +45,10 @@ #ifndef S_ISDIR #define S_ISDIR(m) (((m)&S_IFMT) == S_IFDIR) #endif -/* - This namespace has various generic functions related to files and paths. - The code still needs a ton of cleanup. - REMEMBER: strdup considered harmful! -*/ + +// This namespace has various generic functions related to files and paths. +// The code still needs a ton of cleanup. +// REMEMBER: strdup considered harmful! namespace File { @@ -70,7 +69,7 @@ bool Exists(const char *filename) { struct stat file_info; - char *copy = StripTailDirSlashes(strdup(filename)); + char *copy = StripTailDirSlashes(__strdup(filename)); int result = stat(copy, &file_info); free(copy); @@ -82,7 +81,7 @@ bool IsDirectory(const char *filename) { struct stat file_info; - char *copy = StripTailDirSlashes(strdup(filename)); + char *copy = StripTailDirSlashes(__strdup(filename)); int result = stat(copy, &file_info); free(copy); @@ -488,7 +487,7 @@ const char *GetCurrentDirectory() { const char *dir; // Get the current working directory (getcwd uses malloc) - if (!(dir = getcwd(NULL, 0))) { + if (!(dir = __getcwd(NULL, 0))) { ERROR_LOG(COMMON, "GetCurrentDirectory failed: %s", GetLastErrorMsg()); @@ -500,7 +499,7 @@ const char *GetCurrentDirectory() // Sets the current directory to the given directory bool SetCurrentDirectory(const char *_rDirectory) { - return chdir(_rDirectory) == 0; + return __chdir(_rDirectory) == 0; } #if defined(__APPLE__) @@ -603,4 +602,3 @@ const char *GetUserDirectory() } } // namespace - |
