Fix newly introduced error when installing Luarocks on win
Archive names contain dots, don't remove too much when stripping extensions.
This commit is contained in:
parent
095dcc9b4a
commit
cc7bb37e1a
@ -419,8 +419,12 @@ def sha256_of_file(filename):
|
||||
return hashlib.sha256(contents).hexdigest()
|
||||
|
||||
def strip_extensions(filename):
|
||||
# Just handle .zip and .tar.gz.
|
||||
return os.path.splitext(os.path.splitext(filename)[0])[0]
|
||||
if filename.endswith(".zip"):
|
||||
return filename[:-len(".zip")]
|
||||
elif filename.endswith(".tar.gz"):
|
||||
return filename[:-len(".tar.gz")]
|
||||
else:
|
||||
return filename
|
||||
|
||||
class Program(object):
|
||||
def __init__(self, version):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user