Changeset 10298


Ignore:
Timestamp:
12/13/10 16:45:51 (2 years ago)
Author:
OliverKrueger
Message:

Item10152: ChartPlugin fails to create directories for sub webs

Location:
trunk/ChartPlugin/lib/Foswiki/Plugins
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChartPlugin/lib/Foswiki/Plugins/ChartPlugin.pm

    r9832 r10298  
    214214 
    215215    # before save, create directories if they don't exist. 
    216     # If the top level "pub/$web" directory doesn't exist, create it. 
    217     my $dir = Foswiki::Func::getPubDir() . "/$web"; 
    218     if( ! -e "$dir" ) { 
    219         umask( 002 ); 
    220         mkdir( $dir, 0775 ); 
    221     } 
    222     # If the top level "pub/$web/$topic" directory doesn't exist, create 
    223     # it. 
    224     my $tempPath = "$dir/$topic"; 
    225     if( ! -e "$tempPath" ) { 
    226         umask( 002 ); 
    227         mkdir( $tempPath, 0775 ); 
    228     } 
     216    my $tempPath = Foswiki::Func::getPubDir() . "/$web/$topic"; 
     217    use File::Path; 
     218    eval { File::Path::mkpath( $tempPath, 0, $Foswiki::cfg{RCS}{dirPermission} ); }; 
     219 
    229220    # Return both the directory and the filename 
    230221    return ($tempPath, $fullname); 
  • trunk/ChartPlugin/lib/Foswiki/Plugins/ChartPlugin/DEPENDENCIES

    r7122 r10298  
    22GD,>=0.01,cpan,Required.  Available from CPAN:GD 
    33POSIX,>0,cpan,Required.  Available from CPAN:POSIX 
     4File::Path,>0,cpan,Required  
Note: See TracChangeset for help on using the changeset viewer.