- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Actions/WorldAction/OutputAction.cpp
rbe21fa rf10b0c 39 39 /** =========== define the function ====================== */ 40 40 Action::state_ptr WorldOutputAction::performCall() { 41 LOG(1, "Storing world to file " << params.filename << ".");41 LOG(1, "Storing world to file " << params.filename.get() << "."); 42 42 43 43 // extract suffix 44 44 std::string FilenameSuffix; 45 45 std::string FilenamePrefix; 46 if (params.filename. has_filename()) {46 if (params.filename.get().has_filename()) { 47 47 // get suffix 48 48 #if BOOST_VERSION >= 104600 49 FilenameSuffix = params.filename. extension().string().substr(1); // remove the prefixed "."50 FilenamePrefix = params.filename. stem().string();49 FilenameSuffix = params.filename.get().extension().string().substr(1); // remove the prefixed "." 50 FilenamePrefix = params.filename.get().stem().string(); 51 51 #else 52 FilenameSuffix = params.filename. extension().substr(1); // remove the prefixed "."53 FilenamePrefix = params.filename. stem();52 FilenameSuffix = params.filename.get().extension().substr(1); // remove the prefixed "." 53 FilenamePrefix = params.filename.get().stem(); 54 54 #endif 55 55 } else { … … 61 61 // parse the file 62 62 boost::filesystem::ofstream output; 63 output.open(params.filename );63 output.open(params.filename.get()); 64 64 if (!output.fail()) { 65 65 FormatParserStorage::getInstance().saveWorld(output, FilenameSuffix); 66 66 } else { 67 ELOG(1, "Could not open file " << params.filename << ".");67 ELOG(1, "Could not open file " << params.filename.get() << "."); 68 68 } 69 69 output.close();
Note:
See TracChangeset
for help on using the changeset viewer.