Skip to content

Commit

Permalink
Prevent crash on startup on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Cruor committed Aug 22, 2019
1 parent 893c92f commit c39af82
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/initial_startup.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@ local filesystem = require("filesystem")

local settingsPath = fileLocations.getSettingsPath()

local linuxSteamDirs = {
filesystem.joinpath(os.getenv("HOME"), ".local", "share", "Steam"),
filesystem.joinpath(os.getenv("HOME"), ".steam", "steam"),
}

local startup = {}

function startup.verifyCelesteDir(path)
Expand Down Expand Up @@ -56,6 +51,11 @@ function startup.findSteamDirectory()
return filesystem.joinpath(os.getenv("HOME"), "Library", "Application Support", "Steam")

elseif userOS == "Linux" then
local linuxSteamDirs = {
filesystem.joinpath(os.getenv("HOME"), ".local", "share", "Steam"),
filesystem.joinpath(os.getenv("HOME"), ".steam", "steam"),
}

for i, path <- linuxSteamDirs do
if filesystem.isDirectory(path) then
return path
Expand Down

0 comments on commit c39af82

Please sign in to comment.