Skip to content

Commit

Permalink
Fixed issue with old previous OneDrive usage
Browse files Browse the repository at this point in the history
  • Loading branch information
codemann8 committed Dec 5, 2023
1 parent 9943544 commit 6ed1c67
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/fileio.lua
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ end
function overrideAppSettings()
local fullDir, packRoot = getFullDir()

if fullDir ~= nil then
if fullDir ~= nil and dirExists(fullDir) then
local text = readFile(fullDir, "", "application_settings.json")
if text then
local ndiRate = "3.0"
Expand Down Expand Up @@ -543,10 +543,10 @@ function getFullDir()
local packRoot = "alttpr_codetracker_codemann8\\"
local baseDir = ""

if os.getenv("OneDrive") and dirExists(os.getenv("OneDrive") .. "\\" .. emoDir) then
baseDir = os.getenv("OneDrive") .. "\\"
elseif dirExists(CONFIG.DOCUMENTS_FOLDER .. emoDir) then
if dirExists(CONFIG.DOCUMENTS_FOLDER .. emoDir) then
baseDir = CONFIG.DOCUMENTS_FOLDER
elseif os.getenv("OneDrive") and dirExists(os.getenv("OneDrive") .. "\\" .. emoDir) then
baseDir = os.getenv("OneDrive") .. "\\"
else
print("ERROR: User has changed the location of their 'Documents' folder. Press F1 to read the documentation for steps to resolve.")
print("OneDrive:", os.getenv("OneDrive"))
Expand Down

0 comments on commit 6ed1c67

Please sign in to comment.