projects
/
BackupPC.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c0f0e74
)
Fixed small navigation bug in CGI Action_Browse for top-level directory.
author
cbarratt
<cbarratt>
Tue, 28 Jan 2003 06:19:52 +0000
(06:19 +0000)
committer
cbarratt
<cbarratt>
Tue, 28 Jan 2003 06:19:52 +0000
(06:19 +0000)
cgi-bin/BackupPC_Admin
patch
|
blob
|
history
diff --git
a/cgi-bin/BackupPC_Admin
b/cgi-bin/BackupPC_Admin
index
99cc594
..
85d8807
100755
(executable)
--- a/
cgi-bin/BackupPC_Admin
+++ b/
cgi-bin/BackupPC_Admin
@@
-603,10
+603,10
@@
sub Action_Browse
my($dirOpen, $gotDir, $imgStr, $img);
my $fURI = $f; # URI escaped $f
my $shareURI = $share; # URI escaped $share
my($dirOpen, $gotDir, $imgStr, $img);
my $fURI = $f; # URI escaped $f
my $shareURI = $share; # URI escaped $share
-
my $path = "$relDir/$f"
;
+
(my $path = "$relDir/$f") =~ s{//+}{/}g
;
if ( $shareURI eq "" ) {
$shareURI = $path;
if ( $shareURI eq "" ) {
$shareURI = $path;
- $path = "";
+ $path = "
/
";
}
$path =~ s{^/+}{/};
$path =~ s/([^\w.\/-])/uc sprintf("%%%02x", ord($1))/eg;
}
$path =~ s{^/+}{/};
$path =~ s/([^\w.\/-])/uc sprintf("%%%02x", ord($1))/eg;
@@
-713,9
+713,10
@@
EOF
# Prune the last directory off $relDir, or at the very end
# do the top-level directory.
#
# Prune the last directory off $relDir, or at the very end
# do the top-level directory.
#
- if ( $relDir eq "" ) {
+ if ( $relDir eq ""
|| $relDir eq "/"
) {
$currDir = $share;
$share = "";
$currDir = $share;
$share = "";
+ $relDir = "";
} else {
$relDir =~ s/(.*)\/(.*)/$1/;
$currDir = $2;
} else {
$relDir =~ s/(.*)\/(.*)/$1/;
$currDir = $2;