mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Don't die if path to database has on ascii characters
This commit is contained in:
parent
0533cf2e5f
commit
4bcec54057
@ -15,7 +15,7 @@
|
||||
import os, sys, textwrap, cStringIO, collections, traceback, shutil
|
||||
|
||||
from PyQt4.QtCore import Qt, SIGNAL, QObject, QCoreApplication, \
|
||||
QSettings, QVariant, QSize, QThread
|
||||
QSettings, QVariant, QSize, QThread, QString
|
||||
from PyQt4.QtGui import QPixmap, QColor, QPainter, QMenu, QIcon, QMessageBox, \
|
||||
QToolButton, QDialog
|
||||
from PyQt4.QtSvg import QSvgRenderer
|
||||
@ -802,8 +802,9 @@ class Main(MainWindow, Ui_MainWindow):
|
||||
settings.beginGroup("Main Window")
|
||||
self.resize(settings.value("size", QVariant(QSize(800, 600))).toSize())
|
||||
settings.endGroup()
|
||||
dbpath = os.path.join(os.path.expanduser(u'~'), u'library1.db').encode('utf-8')
|
||||
self.database_path = qstring_to_unicode(settings.value("database path",
|
||||
QVariant(os.path.join(os.path.expanduser('~'),'library1.db'))).toString())
|
||||
QVariant(QString.fromUtf8(dbpath))).toString())
|
||||
set_sidebar_directories(None)
|
||||
|
||||
def write_settings(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user