projects
/
mussa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
707d28f
)
motif save should have a default extension.
author
Diane Trout
<diane@caltech.edu>
Tue, 17 Oct 2006 20:41:32 +0000
(20:41 +0000)
committer
Diane Trout
<diane@caltech.edu>
Tue, 17 Oct 2006 20:41:32 +0000
(20:41 +0000)
ticket:188
qui/MussaWindow.cpp
patch
|
blob
|
history
diff --git
a/qui/MussaWindow.cpp
b/qui/MussaWindow.cpp
index 36727a1635dd617670561688798bd5d789e0d855..640d6f8448337cfe654de89e349d649b42891c5e 100644
(file)
--- a/
qui/MussaWindow.cpp
+++ b/
qui/MussaWindow.cpp
@@
-24,6
+24,7
@@
#include <boost/filesystem/path.hpp>
#include <boost/filesystem/operations.hpp>
#include <boost/filesystem/path.hpp>
#include <boost/filesystem/operations.hpp>
+#include <boost/filesystem/convenience.hpp>
namespace fs = boost::filesystem;
#include <boost/bind.hpp>
namespace fs = boost::filesystem;
#include <boost/bind.hpp>
@@
-465,6
+466,10
@@
void MussaWindow::saveMotifList()
// try to load safely
try {
fs::path converted_path(path.toStdString(), fs::native);
// try to load safely
try {
fs::path converted_path(path.toStdString(), fs::native);
+ if (fs::extension(converted_path).size() == 0) {
+ // no extension, so add one
+ converted_path = converted_path.string() + ".mtl";
+ }
analysis->save_motifs(converted_path);
default_dir->setPath(converted_path.branch_path().native_directory_string().c_str());
} catch (runtime_error e) {
analysis->save_motifs(converted_path);
default_dir->setPath(converted_path.branch_path().native_directory_string().c_str());
} catch (runtime_error e) {