summaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-04-24 22:30:05 +0100
committerCarl Hetherington <cth@carlh.net>2013-04-24 22:30:05 +0100
commitccc07eebc492d74c351c235584fd708c46b5b656 (patch)
tree69e4efeb452b6b20cb123fbb582a1538d660eb6f /src/tools
parent8805ae23ce2c3a19fc6a1fd341cff899bfb61128 (diff)
Fix #124 (allow use of existing directories for new films).
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/dvdomatic.cc14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/tools/dvdomatic.cc b/src/tools/dvdomatic.cc
index 2a995bee8..b161ac7e3 100644
--- a/src/tools/dvdomatic.cc
+++ b/src/tools/dvdomatic.cc
@@ -301,9 +301,17 @@ private:
if (r == wxID_OK) {
- if (boost::filesystem::exists (d->get_path())) {
- error_dialog (this, std_to_wx (String::compose (wx_to_std (_("The directory %1 already exists.")), d->get_path().c_str())));
- return;
+ if (boost::filesystem::exists (d->get_path()) && !boost::filesystem::is_empty(d->get_path())) {
+ if (!confirm_dialog (
+ this,
+ std_to_wx (
+ String::compose (wx_to_std (_("The directory %1 already exists and is not empty. "
+ "Are you sure you want to use it?")),
+ d->get_path().c_str())
+ )
+ )) {
+ return;
+ }
}
maybe_save_then_delete_film ();