]> git.decadent.org.uk Git - ion3.git/blobdiff - ioncore/ioncore_wd.lua
Update cfg_kludge_flash for Flash 10
[ion3.git] / ioncore / ioncore_wd.lua
index d69a9eb1fc01f0170bc9f36d3bef9832686ea241..b00b18daffcfeacbddb09476403ee9ee7dc28325 100644 (file)
@@ -1,33 +1,26 @@
 --
 -- ion/share/ioncore_wd.lua
 -- 
--- Copyright (c) Tuomo Valkonen 2004-2007.
+-- Copyright (c) Tuomo Valkonen 2004-2009.
 --
 -- See the included file LICENSE for details.
 --
 
 local savefile="saved_wd"
 local dirs={}
-local px
+local lfs
 
-if pcall(function() return require('posix') end) then
-    px=posix
+if pcall(function() return require('lfs') end) then
+    lfs=_G["lfs"]
 end
 
 local function checkdir(d)
-    if not px then
+    if not lfs then
         return true
     else
-        local t, err=px.stat(d, "type")
+        local t, err=lfs.attributes(d, "mode")
         if not t then
             return nil, err
-        elseif t=="link" then
-            local d2, err=px.readlink(d)
-            if not d2 then
-                return nil, err
-            else
-                return checkdir(d2)
-            end
         elseif t=="directory" then
             return true
         else