Bug 530125 - When forcing files, create the full workdir path if it doesn't exist yet. (NPOTB) - r=armenzg
authorChris Cooper <ccooper@deadsquid.com>
Mon, 23 Nov 2009 16:38:31 -0500
changeset 35207 adb526f5ae6ddf469f80dabad4998f5157daf8b8
parent 35206 ca1b44e2900c461df281ce96dd1f5e0eede2d348
child 35208 2efba3694de13691b7b9de1fa2e543ef4f398688
push idunknown
push userunknown
push dateunknown
reviewersarmenzg
bugs530125
milestone1.9.3a1pre
Bug 530125 - When forcing files, create the full workdir path if it doesn't exist yet. (NPOTB) - r=armenzg
tools/update-packaging/make_incremental_update.sh
--- a/tools/update-packaging/make_incremental_update.sh
+++ b/tools/update-packaging/make_incremental_update.sh
@@ -107,16 +107,18 @@ for ((i=0; $i<$num_oldfiles; i=$i+1)); d
     continue 1
   fi
 
   # If this file exists in the new directory as well, then check if it differs.
   if [ -f "$newdir/$f" ]; then
 
     if check_for_forced_update "$requested_forced_updates" "$f"; then
       echo 1>&2 "  FORCING UPDATE for file '$f'..."
+      # The full workdir may not exist yet, so create it if necessary. 
+      mkdir -p `dirname "$workdir/$f"`
       $BZIP2 -cz9 "$newdir/$f" > "$workdir/$f"
       make_add_instruction "$f" >> $manifest
       archivefiles="$archivefiles \"$f\""
       continue 1
     fi
 
     if ! diff "$olddir/$f" "$newdir/$f" > /dev/null; then
       # Compute both the compressed binary diff and the compressed file, and