ModOrganizer-to-OpenMW icon indicating copy to clipboard operation
ModOrganizer-to-OpenMW copied to clipboard

Permissions issue opening openmw.cfg

Open AnyOldName3 opened this issue 3 years ago • 2 comments

Gives traces resembling:

[error.cpp:24] Traceback (most recent call last):
 [error.cpp:24]   File "K:/Programs/MO2/plugins/OpenMWExport.py", line 82, in display
 [error.cpp:24]     self.__clearOpenMWConfig(configPath)
 [error.cpp:24]   File "K:/Programs/MO2/plugins/OpenMWExport.py", line 140, in __clearOpenMWConfig
[error.cpp:24]     os.remove(configPath)
[error.cpp:24] PermissionError: [WinError 5] Access is denied: 'C:\\Users\\User\\Documents\\My Games\\OpenMW\\openmw.cfg'
 Plugin "OpenMW Exporter" failed: Traceback (most recent call last):
  File "K:/Programs/MO2/plugins/OpenMWExport.py", line 82, in display
    self.__clearOpenMWConfig(configPath)
  File "K:/Programs/MO2/plugins/OpenMWExport.py", line 140, in __clearOpenMWConfig
  os.remove(configPath)
PermissionError: [WinError 5] Access is denied: 'C:\\Users\\User\\Documents\\My Games\\OpenMW\\openmw.cfg'

I've been told this is likely related to Controlled Folder Access, a Windows security feature. Apparently, Microsoft thinks there's no legitimate reason to access a file in the Documents directory programmatically without having the user select it. For some reason, OpenMW's allowed to (I'm told a popup is displayed asking the user to give it permission) but when MO2 tries, the popup doesn't appear and it's just blocked.

AnyOldName3 avatar Nov 07 '21 15:11 AnyOldName3