From efeea3fb6ac8049347d85e882b48cdbe10040077 Mon Sep 17 00:00:00 2001 From: hummypkg Date: Mon, 9 Sep 2013 20:25:23 +0000 Subject: [PATCH] update --- CONTROL/control | 2 +- webif/plugin/sweeper/auto.hook | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/CONTROL/control b/CONTROL/control index 1350421..d3b4166 100644 --- a/CONTROL/control +++ b/CONTROL/control @@ -1,7 +1,7 @@ Package: sweeper Priority: optional Section: misc -Version: 1.0.6 +Version: 1.0.8 Architecture: mipsel Maintainer: af123@hummypkg.org.uk Depends: webif(>=1.0.5-5) diff --git a/webif/plugin/sweeper/auto.hook b/webif/plugin/sweeper/auto.hook index cb6f1df..1057fa0 100644 --- a/webif/plugin/sweeper/auto.hook +++ b/webif/plugin/sweeper/auto.hook @@ -224,6 +224,25 @@ proc ::sweeper::folder_action {ts cmds} { switch $cmd { preserve { return 1 } + movecreate - + move { + set rest [::sweeper::expand $ts $rest] + if {![file isdirectory "$root/$rest"]} { + if {$cmd eq "move"} { + log " ... No such directory $root/$rest" 2 + return 1 + } + system mkdir_p "$root/$rest" + if {![file isdirectory "$root/$rest"]} { + log "Error creating directory $root/$rest" 1 + return 1 + } else { + log " ... created directory $root/$rest" 2 + } + } + ::sweeper:folder_merge $folder "$root/$rest" + return 1 + } fileundercreate - fileunder { if {![file isdirectory "$root/$rest"]} {