Mercurial > repos > pitagora > filebrowser
changeset 2:061f8331778a
Deleted selected files
author | pitagora |
---|---|
date | Tue, 12 Aug 2014 07:38:37 -0400 |
parents | 3f3b545df9d9 |
children | 31c2544cc45e |
files | filebrowser/filebrowser.xml filebrowser/link_path_2.pl |
diffstat | 2 files changed, 0 insertions(+), 53 deletions(-) [+] |
line wrap: on
line diff
--- a/filebrowser/filebrowser.xml Tue Aug 12 07:38:30 2014 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,22 +0,0 @@ -<xml version="1.0"?> -<tool name="Local File" id="local_file_browser" tool_type="data_source"> - <description>browser</description> - <command interpreter="perl">link_path_2.pl $source $dest</command> - <inputs action="http://localhost/filebrowser/main.html" check_values="false" method="get"> - <display>go to Local File Browser $GALAXY_URL</display> - <param name="GALAXY_URL" type="baseurl" value="/tool_runner" /> - <param name="tool_id" type="hidden" value="local_file_browser" /> - </inputs> - <request_param_translation> - <request_param galaxy_name="URL_method" remote_name="URL_method" missing="post" /> - <request_param galaxy_name="URL" remote_name="URL" missing="" /> - <request_param galaxy_name="dbkey" remote_name="db" missing="?" /> - <request_param galaxy_name="file_name" remote_name="name" missing="no_name" /> - <request_param galaxy_name="source" remote_name="path" missing="" label="Original File Path" /> - </request_param_translation> - <uihints minwidth="800"/> - <outputs> - <data name="dest" format="data" label="${tool.name}: ${file_name}"/> - </outputs> - <options sanitize="False" refresh="True"/> -</tool>
--- a/filebrowser/link_path_2.pl Tue Aug 12 07:38:30 2014 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,31 +0,0 @@ -#!/usr/bin/perl - -# THIS TOOL HAS BEEN DEPRECATED IN FAVOR OF THE galaxy_import.pl AND gcpd.pl METHOD -# WHICH DON'T REQUIRE SETTING METADATA MANUALLY FOR EACH FILE. - -use strict; -use File::Copy; - -# CONFIG -my @allowed_paths = ('/'); - -# ARGS -my ($src, $dest)=@ARGV; -die("Absolute path required\n") unless $src =~ /^\//; -die("Paths containing '..' are disallowed\n") if $src =~ /\/\.\.\//; -my $ok=0; -foreach my $dir (@allowed_paths) { - my $re="^$dir"; - $re =~ s/\//\\\//g; - if ($src =~ /$re/) { - $ok=1; - last; - } -} -die("Not an allowed source path\n") unless $ok; - -# CP -# if ($src =~ /\.gz$/) -unlink($dest); -system("cp $src $dest"); -exit;