From 6f9bbd2d3774fad59f973b5e65b3e9d4120455ae Mon Sep 17 00:00:00 2001 From: glankk Date: Wed, 21 Feb 2018 23:18:22 +0100 Subject: [PATCH] fixed a file-not-found error when dropping a file with spaces on patch and patch-wad console windows --- patch/lua/patch-wad.lua | 3 +++ patch/lua/patch.lua | 3 +++ 2 files changed, 6 insertions(+) diff --git a/patch/lua/patch-wad.lua b/patch/lua/patch-wad.lua index a278c918..60d48b35 100644 --- a/patch/lua/patch-wad.lua +++ b/patch/lua/patch-wad.lua @@ -3,6 +3,9 @@ if #arg < 1 then print("usage: `patch-wad ` " .. "(or drag and drop a wad onto the patch script)") local line = io.read() + if line ~= nil and line:sub(1, 1) == "\"" and line:sub(-1, -1) == "\"" then + line = line:sub(2, -2) + end if line == nil or line == "" then return end arg[1] = line end diff --git a/patch/lua/patch.lua b/patch/lua/patch.lua index a6626e5c..136a27dd 100644 --- a/patch/lua/patch.lua +++ b/patch/lua/patch.lua @@ -3,6 +3,9 @@ if #arg < 1 then print("usage: `patch ` " .. "(or drag and drop a rom onto the patch script)") local line = io.read() + if line ~= nil and line:sub(1, 1) == "\"" and line:sub(-1, -1) == "\"" then + line = line:sub(2, -2) + end if line == nil or line == "" then return end arg[1] = line end