# HG changeset patch # User pitagora # Date 1421916112 -32400 # Node ID 295a57cb031a8a40e88f45ee7a71c17ee9a54972 # Parent eb8f9e63f85968e88fc97a2075b9233f9a84ac45 20150122 diff -r eb8f9e63f859 -r 295a57cb031a filebrowser.xml --- a/filebrowser.xml Thu Jan 22 17:23:17 2015 +0900 +++ b/filebrowser.xml Thu Jan 22 17:41:52 2015 +0900 @@ -1,21 +1,21 @@ - - browser - link_path_2.pl $source $dest - - go to Local File Browser $GALAXY_URL - - - - - - - - - - - - - - - - + + browser + link_path_2.pl $source $dest + + go to Local File Browser $GALAXY_URL + + + + + + + + + + + + + + + + diff -r eb8f9e63f859 -r 295a57cb031a link_path_2.pl --- a/link_path_2.pl Thu Jan 22 17:23:17 2015 +0900 +++ b/link_path_2.pl Thu Jan 22 17:41:52 2015 +0900 @@ -1,31 +1,31 @@ -#!/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; +#!/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;