Mercurial > forge
changeset 10601:231e30dd572b octave-forge
bug fix for compressed files
author | abarth93 |
---|---|
date | Tue, 31 Jul 2012 08:46:24 +0000 |
parents | f3ac2edb5fee |
children | d85327aaf218 |
files | extra/ncArray/inst/cached_decompress.m |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/extra/ncArray/inst/cached_decompress.m Tue Jul 31 08:29:25 2012 +0000 +++ b/extra/ncArray/inst/cached_decompress.m Tue Jul 31 08:46:24 2012 +0000 @@ -10,7 +10,7 @@ % Alexander Barth, 2012-06-13 % -function [fname]=cached_decompress(url) +function [fname] = cached_decompress(url) global CACHED_DECOMPRESS_DIR @@ -23,7 +23,11 @@ cache_dir = fullfile(getenv('HOME'),'tmp','Cache'); end -if beginswith(url,'http:') || ~endswith(url,'.gz') || ~endswith(url,'.bz2') +% do nothing if +% file is a a remote url (begins with http:) +% or file does not end with .gz or .bz2 + +if beginswith(url,'http:') || ~(endswith(url,'.gz') || endswith(url,'.bz2')) % opendap url or not compressed file fname = url; return