forked from hummypkg/webif
Ignore errors from invalid directories
This commit is contained in:
parent
805b9ba2dc
commit
c73a940bae
@ -9,7 +9,7 @@ httpheader "application/json"
|
||||
set dir [cgi_get dir "/media/My Video/test"]
|
||||
|
||||
puts "{"
|
||||
foreach file [readdir $dir] {
|
||||
foreach file [readdir -nocomplain $dir] {
|
||||
if {[file extension $file] ne ".mp3"} continue
|
||||
|
||||
if {[catch {
|
||||
|
@ -24,7 +24,7 @@ foreach line [split $dutxt "\n"] {
|
||||
}
|
||||
|
||||
# Handle symbolic links.
|
||||
foreach file [readdir $dir] {
|
||||
foreach file [readdir -nocomplain $dir] {
|
||||
set file "$dir/$file"
|
||||
if {[catch {set lk [file readlink $file]}]} continue
|
||||
|
||||
|
@ -28,7 +28,7 @@ foreach dir $dirs {
|
||||
if {!$auto} { puts "\[$dir\]" }
|
||||
loadseries $dir
|
||||
|
||||
foreach file [lsort -command dedupsort [readdir $dir]] {
|
||||
foreach file [lsort -command dedupsort [readdir -nocomplain $dir]] {
|
||||
if {[file extension $file] ne ".nts"} { continue }
|
||||
|
||||
set file "$dir/[file rootname $file].hmt"
|
||||
|
@ -28,7 +28,7 @@ puts "<fieldset style=\"display: inline\">
|
||||
|
||||
loadseries $dir
|
||||
set recalc 0
|
||||
foreach file [lsort -command dedupsort [readdir $dir]] {
|
||||
foreach file [lsort -command dedupsort [readdir -nocomplain $dir]] {
|
||||
set file "$dir/$file"
|
||||
if {[file extension $file] ne ".nts"} { continue }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user