Changes between Initial Version and Version 1 of Ticket #4293, comment 2


Ignore:
Timestamp:
Feb 25, 2021, 7:28:02 PM (5 years ago)
Author:
Tom Goddard

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #4293, comment 2

    initial v1  
    11macOS 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.
    22
     3{{{
    34  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
    45    return _run_code(code, main_globals, None,
     
    3132  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
    3233    traceback.print_stack(file = f)
    33 
    34 
     34}}}