Changes between Initial Version and Version 1 of Ticket #4293, comment 2
- Timestamp:
- Feb 25, 2021, 7:28:02 PM (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #4293, comment 2
initial v1 1 1 macOS asks for permission to access the Desktop because ChimeraX sets the current working directory to ~/Desktop using os.chdir(). The chdir() call does not trigger the permission dialog, but any subsequent os.getcwd() call does. Startup does a getcwd() when the file history contains many thumbnail images because HtmlView.setHtml() in chimerax.ui.widgets() makes a temporary file to work around a QtWebEngine size limitation in setHtml() and making a NamedTemporaryFile uses getcwd() because it considers the current directory for the location. Here is the stack trace for where getcwd is called. 2 2 3 {{{ 3 4 File "/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/runpy.py", line 194, in _run_module_as_main 4 5 return _run_code(code, main_globals, None, … … 31 32 File "/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/ChimeraX_main.py", line 584, in mygetcwd 32 33 traceback.print_stack(file = f) 33 34 34 }}}