Merge pull request #4747 from SniperCZE/master

AddonManager cannot download anything if working dir is on ecryptfs (aka ubuntu's encrypted home)
This commit is contained in:
Yorik van Havre
2021-04-22 11:03:13 +02:00
committed by GitHub

View File

@@ -611,10 +611,14 @@ class ShowWorker(QtCore.QThread):
except Exception:
print("AddonManager: Debug: Error retrieving image from", path)
else:
f = open(storename, "wb")
try:
f = open(storename, "wb")
except OSError:
# ecryptfs (and probably not only ecryptfs) has lower length limit for path
storename = storename[-140:]
f = open(storename, "wb")
f.write(imagedata)
f.close()
# resize the image to 300x300px if needed
img = QtGui.QImage(storename)
if (img.width() > 300) or (img.height() > 300):