diff options
| author | jhurst <jhurst@cinecert.com> | 2011-03-07 06:46:37 +0000 |
|---|---|---|
| committer | jhurst <> | 2011-03-07 06:46:37 +0000 |
| commit | 3feb7cc3f014bf1b2806b3b6819d80d684434e8f (patch) | |
| tree | 64743b6125d263fbb47a98caec9bf362c999936d /src/KM_fileio.cpp | |
| parent | 8ebc231b320ff27a5b624b32af66b0127bcf8358 (diff) | |
*** empty log message ***
Diffstat (limited to 'src/KM_fileio.cpp')
| -rw-r--r-- | src/KM_fileio.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/KM_fileio.cpp b/src/KM_fileio.cpp index b9257ab..0bc8b8e 100644 --- a/src/KM_fileio.cpp +++ b/src/KM_fileio.cpp @@ -343,7 +343,7 @@ Kumu::PathMakeAbsolute(const std::string& Path, char separator) return Path; char cwd_buf [MaxFilePath]; - if ( getcwd(cwd_buf, MaxFilePath) == 0 ) + if ( _getcwd(cwd_buf, MaxFilePath) == 0 ) { DefaultLogSink().Error("Error retrieving current working directory."); return ""; @@ -649,7 +649,7 @@ Kumu::FileReader::OpenRead(const char* filename) const // suppress popup window on error UINT prev = ::SetErrorMode(SEM_FAILCRITICALERRORS|SEM_NOOPENFILEERRORBOX); - const_cast<FileReader*>(this)->m_Handle = ::CreateFile(filename, + const_cast<FileReader*>(this)->m_Handle = ::CreateFileA(filename, (GENERIC_READ), // open for reading FILE_SHARE_READ, // share for reading NULL, // no security @@ -774,7 +774,7 @@ Kumu::FileWriter::OpenWrite(const char* filename) // suppress popup window on error UINT prev = ::SetErrorMode(SEM_FAILCRITICALERRORS|SEM_NOOPENFILEERRORBOX); - m_Handle = ::CreateFile(filename, + m_Handle = ::CreateFileA(filename, (GENERIC_WRITE|GENERIC_READ), // open for reading FILE_SHARE_READ, // share for reading NULL, // no security @@ -1413,7 +1413,7 @@ Kumu::CreateDirectoriesInPath(const std::string& Path) if ( ! PathIsDirectory(tmp_path) ) { #ifdef KM_WIN32 - if ( mkdir(tmp_path.c_str()) != 0 ) + if ( _mkdir(tmp_path.c_str()) != 0 ) #else // KM_WIN32 if ( mkdir(tmp_path.c_str(), 0775) != 0 ) #endif // KM_WIN32 @@ -1433,7 +1433,7 @@ Kumu::CreateDirectoriesInPath(const std::string& Path) Result_t Kumu::DeleteFile(const std::string& filename) { - if ( unlink(filename.c_str()) == 0 ) + if ( _unlink(filename.c_str()) == 0 ) return RESULT_OK; switch ( errno ) @@ -1486,7 +1486,7 @@ h__DeletePath(const std::string& pathname) } } - if ( rmdir(pathname.c_str()) != 0 ) + if ( _rmdir(pathname.c_str()) != 0 ) { switch ( errno ) { @@ -1533,7 +1533,7 @@ Kumu::FreeSpaceForPath(const std::string& path, Kumu::fsize_t& free_space, Kumu: ULARGE_INTEGER lTotalNumberOfBytes; ULARGE_INTEGER lTotalNumberOfFreeBytes; - BOOL fResult = ::GetDiskFreeSpaceEx(path.c_str(), NULL, &lTotalNumberOfBytes, &lTotalNumberOfFreeBytes); + BOOL fResult = ::GetDiskFreeSpaceExA(path.c_str(), NULL, &lTotalNumberOfBytes, &lTotalNumberOfFreeBytes); if (fResult) { free_space = static_cast<Kumu::fsize_t>(lTotalNumberOfFreeBytes.QuadPart); total_space = static_cast<Kumu::fsize_t>(lTotalNumberOfBytes.QuadPart); |
