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