about summary refs log tree commit diff stats
path: root/file.lua
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-09-26 15:17:57 -0700
committerKartik K. Agaram <vc@akkartik.com>2022-09-26 15:19:47 -0700
commitd1dd3e441f35a2f54b699e7a3a1874a4788f8ed5 (patch)
treead2b14666a60a7b132be9c25ce7f58a7fae9f22d /file.lua
parentd1d05fe5c9a509701aa585e354a1f840074fb6f3 (diff)
downloadlines.love-d1dd3e441f35a2f54b699e7a3a1874a4788f8ed5.tar.gz
fix support for absolute paths in Windows
Diffstat (limited to 'file.lua')
-rw-r--r--file.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/file.lua b/file.lua
index 72c114a..2140bb1 100644
--- a/file.lua
+++ b/file.lua
@@ -187,6 +187,7 @@ function is_absolute_path(path)
     -- POSIX systems permit backslashes in filenames
     return path:sub(1,1) == '/'
   elseif os_path_separator == '\\' then
+    if path:sub(2,2) == ':' then return true end  -- DOS drive letter followed by volume separator
     local f = path:sub(1,1)
     return f == '/' or f == '\\'
   else