No need to initialize oldname = self:FullFileName() twice when renaming a file --- one initialization is enough.

(and, while at it, replaced references to a non-existent word "extention" with the proper English "extension")
This commit is contained in:
Tigran Aivazian
2012-09-10 18:17:50 +01:00
parent bfc369062e
commit 253a0829ff
3 changed files with 10 additions and 11 deletions

View File

@@ -45,7 +45,7 @@ function CREReader:ZipContentExt(fname)
if i == 4 then s = lines break else i = i + 1 end
end
end
if s then -- return the extention
if s then -- return the extension
return string.lower(string.match(s, ".+%.([^.]+)") or "")
else
return nil