diff --git a/src/filesys.cpp b/src/filesys.cpp index 1070b31e5..805aae6ae 100644 --- a/src/filesys.cpp +++ b/src/filesys.cpp @@ -21,6 +21,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "strfnd.h" #include #include +#include "log.h" namespace fs { @@ -51,7 +52,7 @@ std::vector GetDirListing(std::string pathstring) if( DirSpec == NULL ) { - printf( "Insufficient memory available\n" ); + errorstream<<"GetDirListing: Insufficient memory available"< GetDirListing(std::string pathstring) // Check that the input is not larger than allowed. if (pathstring.size() > (BUFSIZE - 2)) { - _tprintf(TEXT("Input directory is too large.\n")); + errorstream<<"GetDirListing: Input directory is too large."< GetDirListing(std::string pathstring) if (hFind == INVALID_HANDLE_VALUE) { - _tprintf (TEXT("Invalid file handle. Error is %u.\n"), - GetLastError()); + errorstream<<"GetDirListing: Invalid file handle. Error is " + < GetDirListing(std::string pathstring) FindClose(hFind); if (dwError != ERROR_NO_MORE_FILES) { - _tprintf (TEXT("FindNextFile error. Error is %u.\n"), - dwError); - retval = (-1); - goto Cleanup; + errorstream<<"GetDirListing: FindNextFile error. Error is " + < GetDirListing(std::string pathstring) DIR *dp; struct dirent *dirp; if((dp = opendir(pathstring.c_str())) == NULL) { - //std::cout<<"Error("< list = GetDirListing(path); for(unsigned int i=0; i