summaryrefslogtreecommitdiffstats
path: root/src/gui/LoadPatchWindow.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2010-03-04 06:34:58 +0000
committerDavid Robillard <d@drobilla.net>2010-03-04 06:34:58 +0000
commitc3b76bacaddce404f3bc86ed29e8b18a6861238d (patch)
tree57d3d9e05f9513593358f9ca9d6ba5e08df1e032 /src/gui/LoadPatchWindow.cpp
parent3157f13a4f8227d53d4c6c0669d2ea2e7ebe7d6b (diff)
downloadingen-c3b76bacaddce404f3bc86ed29e8b18a6861238d.tar.gz
ingen-c3b76bacaddce404f3bc86ed29e8b18a6861238d.tar.bz2
ingen-c3b76bacaddce404f3bc86ed29e8b18a6861238d.zip
Always save to Ingen bundles (directories with names like foo.ingen.lv2 containg at least manifest.ttl and foo.ingen.ttl).
Gracefully handle attempts to save over files, directories resembling ingen bundles, and non-ingen directories. Use Glib::file_test instead of attempting to open files with fstream. Construct a root patch URI from the bundle URI if Parser::parse_document is passed a bundle URI. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2515 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui/LoadPatchWindow.cpp')
-rw-r--r--src/gui/LoadPatchWindow.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/LoadPatchWindow.cpp b/src/gui/LoadPatchWindow.cpp
index c274a30d..3a06843b 100644
--- a/src/gui/LoadPatchWindow.cpp
+++ b/src/gui/LoadPatchWindow.cpp
@@ -162,6 +162,9 @@ LoadPatchWindow::ok_clicked()
uris.ingen_polyphony,
_poly_spinbutton->get_value_as_int()));
+ if (get_uri() == "")
+ return;
+
if (_import) {
// If unset load_patch will load value
optional<Path> parent;