[Bio] / FigKernelPackages / Subsystem.pm Repository:
ViewVC logotype

Diff of /FigKernelPackages/Subsystem.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.111, Tue Jul 24 17:31:16 2007 UTC revision 1.112, Wed Aug 8 21:55:29 2007 UTC
# Line 520  Line 520 
520    
521  sub create_new_diagram  sub create_new_diagram
522  {  {
523      my($self, $fh, $html_fh, $name, $id)  = @_;      my($self, $fh, $html_fh, $name, $id, $overwrite)  = @_;
524    
525      #      #
526      # Get a new id.      # Get a new id.
527      #      #
528    
529      my $dir = "$self->{dir}/diagrams";      my $dir = "$self->{dir}/diagrams";
530        my $old_dir = "$self->{dir}/old_diagrams";
531    
532      Tracer::Insure($dir);      Tracer::Insure($dir);
533        Tracer::Insure($old_dir);
534    
535      my $path;      my $path;
536    
# Line 542  Line 544 
544    
545          if (-d $path)          if (-d $path)
546          {          {
547                if (!$overwrite)
548                {
549              confess "Diagram id $id already exists in subsystem $self->{name}";              confess "Diagram id $id already exists in subsystem $self->{name}";
550          }          }
551                else
552                {
553                    my $opath = "$old_dir/$id." . time;
554                    rename($path, $opath);
555                }
556            }
557    
558      }      }
559      else      else

Legend:
Removed from v.1.111  
changed lines
  Added in v.1.112

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3