Module: check_mk
Branch: master
Commit: 1e57ab5dccbeffc9018ad94d2c4e5a5da6501ccb
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1e57ab5dccbeff…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Nov 30 15:17:53 2015 +0100
#2779 FIX Fix moving of folders
This fixes the error message <i>Cannot move folder: A folder with this name
already exists in the target folder.</i>
---
.werks/2779 | 10 ++++++++++
ChangeLog | 1 +
web/htdocs/wato.py | 3 ++-
3 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/.werks/2779 b/.werks/2779
new file mode 100644
index 0000000..ab425bd
--- /dev/null
+++ b/.werks/2779
@@ -0,0 +1,10 @@
+Title: Fix moving of folders
+Level: 2
+Component: wato
+Compatible: compat
+Version: 1.2.7i4
+Date: 1448893037
+Class: fix
+
+This fixes the error message <i>Cannot move folder: A folder with this name
+already exists in the target folder.</i>
diff --git a/ChangeLog b/ChangeLog
index e321c90..6492316 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -156,6 +156,7 @@
* 2791 FIX: Service parameter overview: Fixed problem displaying incorrect rule for
classical checks...
* 2793 FIX: Parameter Overview: Prevent python unicode warnings for services with
umlauts...
* 2845 FIX: LDAP: Fixed exception in connection test on complain issue during
connection creation
+ * 2779 FIX: Fix moving of folders...
Notifications:
* 2728 FIX: Removed debug notification script (was not executable)...
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index c8e6644..79062d6 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -1727,7 +1727,8 @@ def move_folder(what_folder, target_folder):
raise MKUserError(None, _("Cannot move folder: Target folder is
locked."))
new_dir = folder_dir(target_folder)
- if os.path.exists(new_dir):
+ new_folder_dir = new_dir + "/" + what_folder[".name"]
+ if os.path.exists(new_folder_dir):
raise MKUserError(None, _("Cannot move folder: A folder with this name
already exists in the target folder."))
old_parent = what_folder[".parent"]