Changeset 1693

Show
Ignore:
Timestamp:
09/16/06 23:18:19
Author:
miyagawa
Message:

Publish::CHTML: support Win32 to work around symlink

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/plagger/lib/Plagger/Plugin/Publish/CHTML.pm

    r1684 r1693  
    66use Digest::MD5 qw(md5_hex); 
    77use File::Path; 
     8use File::Copy; 
    89 
    910sub register { 
     
    113114    my ($self, $old, $new) = @_; 
    114115    unlink $new if -e $new; 
    115     symlink $old, $new; 
     116    eval { symlink $old, $new; }; 
     117    if ($@) {  # primarily for Win32 
     118      copy $old, $new; 
     119    } 
    116120} 
    117121