projects
/
cloudstore.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of git.rot13.org:/git/cloudstore
[cloudstore.git]
/
web-api.pl
diff --git
a/web-api.pl
b/web-api.pl
index
8802149
..
2adcf2a
100755
(executable)
--- a/
web-api.pl
+++ b/
web-api.pl
@@
-2,6
+2,7
@@
use Mojolicious::Lite;
use Data::Dump qw(dump);
use Mojolicious::Lite;
use Data::Dump qw(dump);
+use Cwd;
# Documentation browser under "/perldoc" (this plugin requires Perl 5.10)
plugin 'pod_renderer';
# Documentation browser under "/perldoc" (this plugin requires Perl 5.10)
plugin 'pod_renderer';
@@
-18,16
+19,21
@@
warn "XXXXX ", dump( $self->req->url->path->to_string );
return $self->redirect_to( $path ) if -f $path;
return $self->redirect_to( $path ) if -f $path;
+ my $cwd = getcwd;
+ chdir $path;
+ # need to chdir because glob seems to have limited length return values
+
my $files = [
map {
$_ .= '/' if -d $_;
my $files = [
map {
$_ .= '/' if -d $_;
- s{$path/}{};
$_;
}
$_;
}
- glob
"$path/*"
+ glob
'*'
];
];
- warn "# path $path ",dump($files);
+ chdir $cwd;
+
+ warn "# path ",dump($path, $files);
$self->stash( files => $files );
};
$self->stash( files => $files );
};