SearchFAQMemberlist Log in
Reply to topic Page 1 of 1
[2.0.0beta0] bug in browing a backup : the patch
Author Message
Post [2.0.0beta0] bug in browing a backup : the patch 
re-re-hello,

sorry for the length of this thread, but I think I've found the
correct patch for this problem.

See below for my patch, that includes the previous patch referenced as
above:

From: Craig Barratt <craig < at > at...>
Re: 2.0.0beta0 patch for CGI browse bug

http://sourceforge.net/mailarchive/message.php?msg_id=4175797


Regards,

Pierre Bourgin


---------------------------------------------------------------------------


--- BackupPC_Admin.orig Tue Mar 18 19:20:25 2003
+++ BackupPC_Admin Fri Mar 21 17:32:47 2003
< at > < at > -579,6 +579,7 < at > < at >
ErrorExit(eval("qq{$Lang->{Directory___EscHTML}}"));
}
}
+ $dir = "/$dir" if ( $dir !~ /^\// );
my $relDir = $dir;
my $currDir = undef;

< at > < at > -605,12 +606,12 < at > < at >
my $fURI = $f; # URI escaped $f
my $shareURI = $share; # URI escaped $share
if ( $relDir eq "" ) {
- $path = $f;
+ $path = "/$f";
} else {
($path = "$relDir/$f") =~ s{//+}{/}g;
}
if ( $shareURI eq "" ) {
- $shareURI = $path;
+ ($shareURI = $path ) =~ s/^\/(.*)/$1/;
$path = "/";
}
$path =~ s{^/+}{/};
< at > < at > -719,12 +720,12 < at > < at >
# Prune the last directory off $relDir, or at the very end
# do the top-level directory.
#
- if ( $relDir eq "" || $relDir eq "/" ) {
+ if ( $relDir eq "" || $relDir eq "/" || $relDir !~ /(.*)\/(.*)/ ) {
$currDir = $share;
$share = "";
$relDir = "";
} else {
- $relDir =~ s/(.*)\/(.*)/$1/;
+ $relDir = $1;
$currDir = $2;
}
}

Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
  


Magic SEO URL for phpBB