AnyOldName3 / ModOrganizer-to-OpenMW

A Mod Organizer plugin to export your VFS, plugin selection and load order to OpenMW
GNU General Public License v3.0
17 stars 7 forks source link

Permissions issue opening openmw.cfg #11

Open AnyOldName3 opened 2 years ago

AnyOldName3 commented 2 years ago

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.

stewcanoe commented 5 months ago

I have a "[WinError 5] Access is Denied" error, but my Controlled Folder Access is turned off right now. How do I resolve this?

AnyOldName3 commented 5 months ago

That's not the whole error, so I can't tell you anything until you share your interface log and tell me which button you'd just pressed right before this happened.