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


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

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #4293, comment 2

    v1 v2  
    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.
     1macOS 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.  That happens in session.ui.build() from ChimeraX_main.py.  Here is the stack trace for where getcwd is called.
    22
    33{{{