make desktop folder if missing (#851)

This commit is contained in:
Damien Elmes 2013-05-14 18:24:05 +09:00
parent 7ad33fea06
commit 7ca86e2dd7

View file

@ -53,6 +53,8 @@ class DeckStats(QDialog):
path = os.path.join(
QDesktopServices.storageLocation(QDesktopServices.DesktopLocation),
name)
if not os.path.exists(path):
os.mkdir(path)
p = self.form.web.page()
oldsize = p.viewportSize()
p.setViewportSize(p.mainFrame().contentsSize())