summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreroux <elie.roux@telecom-bretagne.eu>2010-03-17 11:30:11 +0100
committereroux <elie.roux@telecom-bretagne.eu>2010-03-17 11:30:11 +0100
commit6a2c71346c7ff411b496a444bc9bb4086d0bd2dc (patch)
treeb96029f8c1627e109a00425249c1881416cef1ea
parenteb8be6a1a06126d66883495aa499855fb44f4897 (diff)
downloadluaotfload-6a2c71346c7ff411b496a444bc9bb4086d0bd2dc.tar.gz
Fixing database generation under windows
-rw-r--r--otfl-font-nms.lua7
1 files changed, 3 insertions, 4 deletions
diff --git a/otfl-font-nms.lua b/otfl-font-nms.lua
index d241745..d742610 100644
--- a/otfl-font-nms.lua
+++ b/otfl-font-nms.lua
@@ -288,14 +288,13 @@ end
-- - a/../b -> b
-- - /cygdrive/a/b -> a:/b
local function path_normalize(path)
- if os.type == "windows" then
+ if os.type == "windows" or os.type == "msdos" or os.name == "cygwin" then
path = path:gsub('\\', '/')
path = path:lower()
- end
- path = file.collapse_path(path)
- if os.name == "cygwin" then
+ -- for cygwin cases...
path = path:gsub('^/cygdrive/(%a)/', '%1:/')
end
+ path = file.collapse_path(path)
return path
end