summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAki <nthirtyone@gmail.com>2018-04-07 18:29:50 +0200
committerAki <nthirtyone@gmail.com>2018-04-07 18:29:50 +0200
commit517625861535f76f1dcb992fff76d23fe4239f7c (patch)
treec8090826981f8cb7358a32a4602c9bd915855f52
parenta12f063e7f759a4727c6b654140a8acaaa8746f8 (diff)
downloadroflnauts-517625861535f76f1dcb992fff76d23fe4239f7c.zip
roflnauts-517625861535f76f1dcb992fff76d23fe4239f7c.tar.gz
roflnauts-517625861535f76f1dcb992fff76d23fe4239f7c.tar.bz2
Replaced deprecated filesystem functions
-rw-r--r--config/menus/host.lua2
-rw-r--r--config/menus/select.lua2
-rw-r--r--not/Settings.lua2
3 files changed, 3 insertions, 3 deletions
diff --git a/config/menus/host.lua b/config/menus/host.lua
index 2b5fac5..102c4c3 100644
--- a/config/menus/host.lua
+++ b/config/menus/host.lua
@@ -32,7 +32,7 @@ function loadConfigs (dir, process)
local items, icons = {}, {}
for _,file in pairs(love.filesystem.getDirectoryItems(dir)) do
local path = string.format("%s/%s", dir, file)
- if love.filesystem.isFile(path) and file ~= "readme.md" then
+ if love.filesystem.getInfo(path).type == "file" and file ~= "readme.md" then
local item = love.filesystem.load(path)()
if isAvailable(item) then
if process then
diff --git a/config/menus/select.lua b/config/menus/select.lua
index 9f0ed9b..6534004 100644
--- a/config/menus/select.lua
+++ b/config/menus/select.lua
@@ -36,7 +36,7 @@ function loadConfigs (dir, process)
local items, icons = {}, {}
for _,file in pairs(love.filesystem.getDirectoryItems(dir)) do
local path = string.format("%s/%s", dir, file)
- if love.filesystem.isFile(path) and file ~= "readme.md" then
+ if love.filesystem.getInfo(path).type == "file" and file ~= "readme.md" then
local item = love.filesystem.load(path)()
if isAvailable(item) then
if process then
diff --git a/not/Settings.lua b/not/Settings.lua
index ca429eb..f4790b3 100644
--- a/not/Settings.lua
+++ b/not/Settings.lua
@@ -10,7 +10,7 @@ local function convertToNew (old)
end
local function filePrepare ()
- if not love.filesystem.exists("settings") then
+ if not love.filesystem.getInfo("settings") then
local def = love.filesystem.newFile("settings.default")
local new = love.filesystem.newFile("settings")
new:open("w") def:open("r")