Skip to content

Commit

Permalink
Fix #1133 Bitdefender premium Safe Files blocking game.exe
Browse files Browse the repository at this point in the history
Was due to os_get_documents_dir calling diriswriteable

git-svn-id: https://rpg.hamsterrepublic.com/source/wip@11870 7d344553-34f0-0310-a9b1-970ce8f1c3a2
  • Loading branch information
rversteegen committed Jun 23, 2020
1 parent 5725008 commit ef2355d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions os_windows.bas
Original file line number Diff line number Diff line change
Expand Up @@ -472,17 +472,18 @@ function os_get_documents_dir() as string
' Might be missing on Win95, and the Documents folder was only added in Win98 anyway.
' Doesn't set an error code!
if SHGetSpecialFolderPathA(0, strptr(buf), CSIDL_PERSONAL, 0) then 'Documents
if diriswriteable(buf) then
'Not using diriswriteable, triggers BitDefender's Safe Files feature
if isdir(buf) then
return buf
else
debug "Can't write to CSIDL_PERSONAL directory " & buf
debug "CSIDL_PERSONAL directory doesn't exist: " & buf
end if
end if
if SHGetSpecialFolderPathA(0, strptr(buf), CSIDL_DESKTOPDIRECTORY, 0) then 'Desktop
if diriswriteable(buf) then
if isdir(buf) then
return buf
else
debug "Can't write to CSIDL_DESKTOPDIRECTORY " & buf
debug "CSIDL_DESKTOPDIRECTORY doesn't exist: " & buf
end if
end if
end if
Expand Down

0 comments on commit ef2355d

Please sign in to comment.