correct parameter expansion in get_source_names()

The assignment to SRCNAME was trying to cut out the longest match of
'%/download' rather than cutting off '/download'. The notable practical
effect was not recognizing that we had a source in the cache, since
foo.tar.gz/download != foo.tar.gz, so downloading it again. (Again, I
wonder how this could have ever gotten through testing and, again, I
feel like this sort of botched parameter expansion has happened before,
but can't find it in the vcs.)
This commit is contained in:
slakmagik 2011-03-15 20:46:08 +00:00
parent f678bf16ad
commit 0c1bc1c8f1

View File

@ -2775,7 +2775,7 @@ get_source_names() {
# remove the '/download' from several SRCNAMEs that end that way
# rather than in the actual tarball so the subsequent basename doesn't
# end with 'download'
SRCNAME=${DL//%\/download}
SRCNAME=${DL%\/download}
SRCNAME=${SRCNAME##*/}
# calcurse has a nonsense url in the info file - this is to get it
# through this function and on to remove_obsolete_sources()