From 402b679d1ea86d9654124c88e0940bf539ced5e7 Mon Sep 17 00:00:00 2001 From: David Rose Date: Wed, 19 Mar 2003 02:23:24 +0000 Subject: [PATCH] don't write egg file until we've finished generating it --- pandatool/src/mayaprogs/mayaToEgg.cxx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pandatool/src/mayaprogs/mayaToEgg.cxx b/pandatool/src/mayaprogs/mayaToEgg.cxx index 7fb4f717cd..0ae74438e6 100644 --- a/pandatool/src/mayaprogs/mayaToEgg.cxx +++ b/pandatool/src/mayaprogs/mayaToEgg.cxx @@ -91,9 +91,12 @@ run() { mayaegg_cat->set_severity(NS_info); } - // Let's open the output file before we initialize Maya, since Maya - // now has a nasty habit of changing the current directory. - get_output(); + // Let's convert the output file to a full path before we initialize + // Maya, since Maya now has a nasty habit of changing the current + // directory. + if (_got_output_filename) { + _output_filename.make_absolute(); + } nout << "Initializing Maya.\n"; MayaToEggConverter converter(_program_name);