mirror of
https://github.com/python/cpython.git
synced 2025-11-01 14:11:41 +00:00
Could not open files in .idlerc directory if latter was hidden on Windows.
Issue 1743, Issue 1862.
This commit is contained in:
parent
1d9a9eaa89
commit
b4aaa76053
2 changed files with 10 additions and 2 deletions
|
|
@ -139,7 +139,12 @@ def Save(self):
|
|||
|
||||
"""
|
||||
if not self.IsEmpty():
|
||||
cfgFile=open(self.file,'w')
|
||||
fname = self.file
|
||||
try:
|
||||
cfgFile = open(fname, 'w')
|
||||
except IOError:
|
||||
fname.unlink()
|
||||
cfgFile = open(fname, 'w')
|
||||
self.write(cfgFile)
|
||||
else:
|
||||
self.RemoveFile()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue