From d173a15609f4294cac1cdbc697f0945c22dc3b0b Mon Sep 17 00:00:00 2001 From: Nodir Temirkhodjaev Date: Sun, 18 Jan 2015 13:14:46 +0500 Subject: [PATCH] Util: Reload DOS device names (after adding new drive?). --- bin/lua/wipf/util.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/lua/wipf/util.lua b/bin/lua/wipf/util.lua index 43633268..90dbf0b4 100644 --- a/bin/lua/wipf/util.lua +++ b/bin/lua/wipf/util.lua @@ -27,11 +27,13 @@ do end dosname_to_drive = function (dos_name) - if not drives then + local name = dos_name:lower() + + if not drives or not drives[name] then fill_drives() end - return drives[dos_name:lower()] or "?:" + return drives[name] or "?:" end end