folders with .'s at the end gave errors
This commit is contained in:
parent
b4ee0ccfcf
commit
dd38f38e89
@ -206,13 +206,14 @@ CreateFileList() {
|
||||
sourcepath="${1/\[/\\\[}/*"
|
||||
sourcepath="${sourcepath/\]/\\\]}"
|
||||
for file in $sourcepath; do
|
||||
relfile="${file#"$1/"}"
|
||||
if [[ -d "${1}/$relfile" ]]; then
|
||||
origfile="${file#"$1/"}"
|
||||
relfile=$(echo ${origfile} | sed -e 's/\(\.\)*$//g')
|
||||
if [[ -d "${1}/$origfile" ]]; then
|
||||
newdir="${3}/$relfile"
|
||||
newdir=${newdir#"/"}
|
||||
VerboseOutput 1 "Entering $newdir"
|
||||
CreateFileList "${1}/$relfile" "${2}/$relfile" "$newdir"
|
||||
elif [[ ! -f "${2}/$relfile" || "${1}/$relfile" -nt "${2}/$relfile" ]]; then
|
||||
CreateFileList "${1}/$origfile" "${2}/$relfile" "$newdir"
|
||||
elif [[ "${1}/$origfile" != *".m3u" ]] && [[ ! -f "${2}/$relfile" || "${1}/$origfile" -nt "${2}/$relfile" ]]; then
|
||||
echo ${3}/$relfile >> /tmp/music-sync-filelist
|
||||
VerboseOutput 2 "Added: ${3}/${relfile}"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user