# File lib/fastcst/changeset.rb, line 609
609:         def run(indata, dir)
610:         
611:             # don't bother running if this is a symlink
612:             if @symlink
613:                 UI.event :symlink, "Skipped delta of symlink #@path"
614:             else
615:                 begin
616:                     Dir.chdir dir do 
617:                         UI.event :delta, @path
618:                         
619:                         # skip the file if it doesn't exist
620:                         if not File.exist? @path
621:                             UI.event :missing,  "Can't delta #@path, file missing"
622:                             return false
623:                         end
624:                         
625:                         # no need to process the the delta if it's 0 length
626:                         if @length > 0
627:                             reference = File.read @path
628:                             delta = StringIO.new(indata.read(@length))
629:                             outfile = File.open(@path, "wb")
630: 
631:                             SuffixArrayDelta::apply_delta(reference, delta, outfile)
632:                         end
633:                 
634:                         # update the file's mtime
635:                         File.utime(Time.new, @mtime, @path)
636:                     end
637:                 rescue
638:                     UI.failure :delta, "#$!"
639:                     outfile.close if outfile
640:                     return false
641:                 end
642:             end
643:             
644:             return true
645:         end