Update mtape.lua

Added ".dfpwm" concatenation to the fileName parameter if it can't find what you've entered without it
This commit is contained in:
LDDestroier 2023-09-30 15:49:39 -04:00 committed by GitHub
parent 7c9cd5460e
commit c2a186c3fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -2,7 +2,7 @@
-- tape managing program
-- made by LDDestroier
local _DEBUG = true
local _DEBUG = false
local function checkOption(argName, argInfo, isShort)
for i = 1, #argInfo do
@ -350,6 +350,9 @@ if fileName:sub(1,8) == "https://" then
success, contents = getFileContents(fileName, true)
print("Done.")
else
if not fs.exists(fileName) then
fileName = fileName .. ".dfpwm"
end
success, contents = getFileContents(fileName, false)
end