Skip to content

Commit

Permalink
Item13455: Don't encode filenames read from directories
Browse files Browse the repository at this point in the history
  • Loading branch information
gac410 committed Jun 13, 2015
1 parent 8b314fa commit 2ece92b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions PlainFileStoreContrib/lib/Foswiki/Store/PlainFile.pm
Original file line number Diff line number Diff line change
Expand Up @@ -782,14 +782,14 @@ sub remove {

# Topic or attachment
_unlink( _latestFile( $meta, $attachment ) );
_rmtree( _historyDir( $meta, $attachment ) );
_rmtree( _getPub($meta) ) unless ($attachment); # topic only
_rmtree( _encode( _historyDir( $meta, $attachment ) ) );
_rmtree( _encode( _getPub($meta) ) ) unless ($attachment); # topic only
}
else {

# Web
_rmtree( _getData($meta) );
_rmtree( _getPub($meta) );
_rmtree( _encode( _getData($meta) ) );
_rmtree( _encode( _getPub($meta) ) );
}

return unless ( $Foswiki::Store::STORE_FORMAT_VERSION < 1.2 );
Expand Down Expand Up @@ -1438,7 +1438,7 @@ sub _mkPathTo {

# Remove an entire directory tree. $root must be encoded.
sub _rmtree {
my $root = _encode(shift);
my $root = shift;
my $D;
if ( opendir( $D, $root ) ) {

Expand Down

0 comments on commit 2ece92b

Please sign in to comment.