forked from p15670423/monkey
island: Modify log message when creating secure directory on Windows
This commit is contained in:
parent
eede06de17
commit
5d7d86aedc
|
@ -30,10 +30,7 @@ def _create_secure_directory_linux(path: str):
|
||||||
# because it will temporarily create an accessible directory which anyone can use.
|
# because it will temporarily create an accessible directory which anyone can use.
|
||||||
os.mkdir(path, mode=0o700)
|
os.mkdir(path, mode=0o700)
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
LOG.error(
|
LOG.error(f'Could not create a directory at "{path}": {str(ex)}')
|
||||||
f'Could not create a directory at "{path}" (maybe environmental variables could not be '
|
|
||||||
f"resolved?): {str(ex)}"
|
|
||||||
)
|
|
||||||
raise ex
|
raise ex
|
||||||
|
|
||||||
|
|
||||||
|
@ -45,7 +42,5 @@ def _create_secure_directory_windows(path: str):
|
||||||
)
|
)
|
||||||
win32file.CreateDirectory(path, security_attributes)
|
win32file.CreateDirectory(path, security_attributes)
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
LOG.error(
|
LOG.error(f'Could not create a directory at "{path}": {str(ex)}')
|
||||||
f'Could not create a directory at "{path}": {str(ex)}'
|
|
||||||
)
|
|
||||||
raise ex
|
raise ex
|
||||||
|
|
Loading…
Reference in New Issue