change_jobname NightlySave $JobName
start_test
-# Remove last / and convert all / to cd commands
-CD=`echo $tmp | sed 's:/$::' | sed 's:/:\ncd :g'`
+# Remove last / and convert first / to "cd /"
+CD=`echo $tmp | sed 's:/$::' | sed 's:^/:cd /:'`
+echo "CD=${CD}"
cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@output /dev/null
@$out ${cwd}/tmp/log2.out
restore where=$tmp/bacula-restores select storage=File1
unmark *
-$CD
+${CD}
mark big
done
yes