use os_generic

This commit is contained in:
David Rose 2006-01-31 04:49:49 +00:00
parent b60d02e604
commit d8a5555d87

View File

@ -241,14 +241,11 @@ read(const Filename &filename) {
maya_cat.info() << "Reading " << filename << "\n"; maya_cat.info() << "Reading " << filename << "\n";
// Load the file into Maya // Load the file into Maya. Maya seems to want forward slashes,
string os_filename = filename.to_os_specific(); // even on Windows.
string os_filename = filename.to_os_generic();
#ifdef WIN32
// Actually, Maya seems to want forward slashes, even on Windows.
os_filename = back_to_front_slash(os_filename);
#endif
MFileIO::newFile(true);
MStatus stat = MFileIO::open(os_filename.c_str()); MStatus stat = MFileIO::open(os_filename.c_str());
if (!stat) { if (!stat) {
stat.perror(os_filename.c_str()); stat.perror(os_filename.c_str());
@ -266,10 +263,7 @@ read(const Filename &filename) {
bool MayaApi:: bool MayaApi::
write(const Filename &filename) { write(const Filename &filename) {
maya_cat.info() << "Writing " << filename << "\n"; maya_cat.info() << "Writing " << filename << "\n";
string os_filename = filename.to_os_specific(); string os_filename = filename.to_os_generic();
#ifdef WIN32
os_filename = back_to_front_slash(os_filename);
#endif
const char *type = "mayaBinary"; const char *type = "mayaBinary";
string extension = filename.get_extension(); string extension = filename.get_extension();