diff --git a/panda/src/downloadertools/check_md5.cxx b/panda/src/downloadertools/check_md5.cxx index f968382a57..3681db1de2 100644 --- a/panda/src/downloadertools/check_md5.cxx +++ b/panda/src/downloadertools/check_md5.cxx @@ -18,8 +18,8 @@ #include #include -#include #include +#include "filename.h" int main(int argc, char *argv[]) { @@ -38,20 +38,16 @@ main(int argc, char *argv[]) { cerr << usagestr << endl; return 0; } - source_file = argv[2]; + source_file = Filename::from_os_specific(argv[2]); } else { - source_file = argv[1]; + source_file = Filename::from_os_specific(argv[1]); } - #ifdef WIN32_VC - if(_access(source_file.c_str(), 0) == -1) { // does this exist on unix? - if(errno==ENOENT) { - cerr << usagestr << endl; - cerr << source_file << " not found!\n"; - return -1; - } - } - #endif + if(!source_file.exists()) { + cerr << usagestr << endl; + cerr << source_file << " not found!\n"; + return -1; + } HashVal hash; md5_a_file(source_file, hash);