We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fcbc588 commit a173e92Copy full SHA for a173e92
src/sage/repl/rich_output/buffer.py
@@ -131,6 +131,12 @@ def _chmod_readonly(cls, filename):
131
0
132
"""
133
import os
134
+ from sage.env import SAGE_EXTCODE
135
+ filename = os.path.abspath(filename)
136
+ if filename.startswith(os.path.abspath(SAGE_EXTCODE)):
137
+ # Do not change permissions on the sample rich output
138
+ # files, as it will cause trouble when upgrading Sage
139
+ return
140
import stat
141
mode = os.stat(filename).st_mode
142
mode = stat.S_IMODE(mode) & ~(stat.S_IWUSR | stat.S_IWGRP | stat.S_IWOTH)
0 commit comments