diff --git a/CONTROL/control b/CONTROL/control index e0552fe..7aebf04 100644 --- a/CONTROL/control +++ b/CONTROL/control @@ -4,6 +4,6 @@ Section: web Version: 0.8.11 Architecture: mipsel Maintainer: af123@hummypkg.org.uk -Depends: mongoose(>=3.0-2),jim(>=0.71-1),jim-sqlite3(>=0.71-1),jim-cgi(>=0.4-1),jim-oo,jim-pack,service-control,busybox(>=1.19.3-1),lsof,epg(>=1.0.8),hmt(>=1.1.4),ssmtp,anacron +Depends: mongoose(>=3.0-2),jim(>=0.71-1),jim-sqlite3(>=0.71-1),jim-cgi(>=0.5),jim-oo,jim-pack,service-control,busybox(>=1.19.3-1),lsof,epg(>=1.0.8),hmt(>=1.1.4),ssmtp,anacron Suggests: ffmpeg,webif-iphone,nicesplice,id3v2 Description: An evolving web interface for the Humax. diff --git a/var/mongoose/cgi-bin/browse/browse.js b/var/mongoose/cgi-bin/browse/browse.js index 65aae49..fca8357 100755 --- a/var/mongoose/cgi-bin/browse/browse.js +++ b/var/mongoose/cgi-bin/browse/browse.js @@ -611,6 +611,7 @@ var dmenuclick = function(action, el, pos) $.post('/cgi-bin/browse/clipboard.jim', { 'act': 'add', + 'dir': dir, 'mode': action, 'path': files }, function() { diff --git a/var/mongoose/cgi-bin/browse/clipboard.jim b/var/mongoose/cgi-bin/browse/clipboard.jim index 1b2fb98..50b735b 100755 --- a/var/mongoose/cgi-bin/browse/clipboard.jim +++ b/var/mongoose/cgi-bin/browse/clipboard.jim @@ -48,12 +48,17 @@ switch $action { } add { if {[set path [cgi_get path]] eq "0"} { - puts "No path." + chunk "No path." exit } + set dir [cgi_unquote_input [cgi_get dir]] set mode [cgi_get mode copy] foreach p $path { set p [cgi_unquote_input $p] + if {$dir ne "0" && ![string match "$dir/*" $p]} { + chunk "$p not in directory
" + continue + } if {![$cb present $p]} { $cb add $mode $p chunk "Added $p for $mode
"