Changeset 3285


Ignore:
Timestamp:
03/12/09 07:41:58 (3 years ago)
Author:
jquelin
Message:

don't copy the my plugin in padre:config:constants, it's not its place

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Padre/lib/Padre/Config/Constants.pm

    r3284 r3285  
    9090# 
    9191# find and return the directory where padre should check the locally 
    92 # installed plugins. create it if needed. copy the My Plugin in it if 
    93 # needed. 
     92# installed plugins. create it if needed. 
    9493# 
    9594# no params. 
    9695# 
    9796sub _find_padre_plugin_dir { 
    98     my $pluginsdir = catdir( $PADRE_CONFIG_DIR, 'plugins' ); 
     97    my $pluginsdir = catdir( $PADRE_CONFIG_DIR, 'plugins', 'Padre', 'Plugin' ); 
    9998 
    10099    # check if plugin directory exists, create it otherwise 
    101     my $fullpath = catdir( $pluginsdir, 'Padre', 'Plugin'   ); 
    102     unless ( -e $fullpath ) { 
    103         mkpath($fullpath) or 
    104         die "Cannot create plugins dir '$fullpath': $!"; 
    105     } 
    106  
    107     # copy the My Plugin if necessary 
    108     my $dst = catfile( $fullpath, 'My.pm' ); 
    109     unless ( -e $dst ) { 
    110         my $src = catfile( dirname($INC{'Padre/Config.pm'}), 'Plugin', 'My.pm' ); 
    111         die "Could not find the original My plugin" unless -e $src; 
    112         copy($src, $dst) or die "Could not copy the My plugin ($src) to $dst: $!"; 
    113         chmod( 0644, $dst); 
     100    unless ( -e $pluginsdir ) { 
     101        mkpath($pluginsdir) or 
     102        die "Cannot create plugins dir '$pluginsdir': $!"; 
    114103    } 
    115104 
Note: See TracChangeset for help on using the changeset viewer.