X-Git-Url: https://git.p6c8.net/devedit.git/blobdiff_plain/8ad672c3c8828a367013ff2f84b89a82cb7533b5..HEAD:/modules/Tool.pm diff --git a/modules/Tool.pm b/modules/Tool.pm index 4dc6fa2..8efe0fa 100644 --- a/modules/Tool.pm +++ b/modules/Tool.pm @@ -6,14 +6,14 @@ package Tool; # Some shared sub routines # # Author: Patrick Canterino -# Last modified: 2010-12-23 +# Last modified: 2011-02-11 # # Copyright (C) 1999-2000 Roland Bluethgen, Frank Schoenmann -# Copyright (C) 2003-2009 Patrick Canterino +# Copyright (C) 2003-2011 Patrick Canterino # All Rights Reserved. # # This file can be distributed and/or modified under the terms of -# of the Artistic License 1.0 (see also the LICENSE file found at +# of the Artistic License 2.0 (see also the LICENSE file found at # the top level of the Dev-Editor distribution). # @@ -40,15 +40,18 @@ use base qw(Exporter); encode_html equal_url file_name - is_archive in_array + is_archive is_disabled_command is_forbidden_file mode_string multi_string upper_path); - -my @archive_exts = ('.zip', 'tar.gz', 'tar.bz2'); + +my @archive_exts = ('.zip', '.tar', '.gz', + '.tar.gz', '.tgz', '.bz2', + '.tar.bz2', '.tbz', '.tbz2', + '.Z'); # check_path() # @@ -305,12 +308,12 @@ sub in_array($$) sub is_archive($) { my $file = shift; - + foreach my $ext(@archive_exts) { return 1 if(lc(substr($file,length($file)-length($ext),length($ext))) eq lc($ext)); } - + return; }