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="${1/\[/\\\[}/*"
|
||||||
sourcepath="${sourcepath/\]/\\\]}"
|
sourcepath="${sourcepath/\]/\\\]}"
|
||||||
for file in $sourcepath; do
|
for file in $sourcepath; do
|
||||||
relfile="${file#"$1/"}"
|
origfile="${file#"$1/"}"
|
||||||
if [[ -d "${1}/$relfile" ]]; then
|
relfile=$(echo ${origfile} | sed -e 's/\(\.\)*$//g')
|
||||||
|
if [[ -d "${1}/$origfile" ]]; then
|
||||||
newdir="${3}/$relfile"
|
newdir="${3}/$relfile"
|
||||||
newdir=${newdir#"/"}
|
newdir=${newdir#"/"}
|
||||||
VerboseOutput 1 "Entering $newdir"
|
VerboseOutput 1 "Entering $newdir"
|
||||||
CreateFileList "${1}/$relfile" "${2}/$relfile" "$newdir"
|
CreateFileList "${1}/$origfile" "${2}/$relfile" "$newdir"
|
||||||
elif [[ ! -f "${2}/$relfile" || "${1}/$relfile" -nt "${2}/$relfile" ]]; then
|
elif [[ "${1}/$origfile" != *".m3u" ]] && [[ ! -f "${2}/$relfile" || "${1}/$origfile" -nt "${2}/$relfile" ]]; then
|
||||||
echo ${3}/$relfile >> /tmp/music-sync-filelist
|
echo ${3}/$relfile >> /tmp/music-sync-filelist
|
||||||
VerboseOutput 2 "Added: ${3}/${relfile}"
|
VerboseOutput 2 "Added: ${3}/${relfile}"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user