diff --git a/src/sbbs3/viewfile.cpp b/src/sbbs3/viewfile.cpp index 39df897a9b51a586dabeff9111ff767210b903a5..1a0fbc9727fc2238b91e4dc8d6d11fb7a904510e 100644 --- a/src/sbbs3/viewfile.cpp +++ b/src/sbbs3/viewfile.cpp @@ -86,12 +86,14 @@ int sbbs_t::viewfile(file_t* f, bool ext) /*****************************************************************************/ /*****************************************************************************/ -bool sbbs_t::viewfile(const char* path) +bool sbbs_t::viewfile(const char* inpath) { + char path[MAX_PATH + 1]; char viewcmd[256]; int i; - if(!fexist(path)) { + SAFECOPY(path, inpath); + if(!fexistcase(path)) { bputs(text[FileNotFound]); return false; }