SearchFAQMemberlist Log in
Reply to topic Page 1 of 1
Re: [2.0.0beta0] bug in browing a backup : the patch
Author Message
Post Re: [2.0.0beta0] bug in browing a backup : the patch 
sorry for the length of this thread, but I think I've found the
correct patch for this problem.

Pierre,

Thanks for the detective work. I've made a slight simplication
to your patch; here's the complete patch against the original
2.0.0beta0.

Would you mind trying mod_perl again? It's possible the same issue
was causing problems with mod_perl.

Craig

--- ./BackupPC_Admin Sun Feb 23 17:46:06 2003
+++ ./BackupPC_Admin.new Fri Mar 21 22:40:01 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 = $f;
$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;
}
}


-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open!
Get cracking and register here for some mind boggling fun and
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
BackupPC-users mailing list
BackupPC-users < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/

Post Re: [2.0.0beta0] bug in browing a backup : the patch 
Craig Barratt wrote:

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

Pierre,

Thanks for the detective work. I've made a slight simplication
to your patch; here's the complete patch against the original
2.0.0beta0.

thanks for this "real" patch (mine was really a "kludge" Wink


Would you mind trying mod_perl again? It's possible the same issue
was causing problems with mod_perl.

Thanks to your patch, everything is working fine for me, either in a
cgi-bin config of apache or by using mod_perl for apache: no more huge
use of memory, neither problems to browse backup.

... more I use backupPC, more I like it !

Regards,

Pierre Bourgin

ps: I have other problems, such as exclude list does not work with
samba, or the restore system with .zip or .tar gives MIME header in the
produced archive file.

I will send emails when I will have more details.


Craig

--- ./BackupPC_Admin Sun Feb 23 17:46:06 2003
+++ ./BackupPC_Admin.new Fri Mar 21 22:40:01 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 = $f;
$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;
}
}


-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open!
Get cracking and register here for some mind boggling fun and
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
BackupPC-users mailing list
BackupPC-users < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/



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