diff --git a/src/geoip.h b/src/geoip.h
index 050782e4d..0117db75f 100644
--- a/src/geoip.h
+++ b/src/geoip.h
@@ -68,13 +68,19 @@ protected:
// Create geoip folder is necessary
QDir gfolder(geoipFolder(false));
if(!gfolder.exists()) {
- if(!gfolder.mkpath(geoipFolder(false))) return;
+ if(!gfolder.mkpath(geoipFolder(false))) {
+ std::cerr << "Failed to create geoip folder at " << qPrintable(geoipFolder(false)) << std::endl;
+ return;
+ }
}
// Remove destination files
if(QFile::exists(geoipDBpath(false)))
QFile::remove(geoipDBpath(false));
// Copy from executable to hard disk
- QFile::copy(geoipDBpath(true), geoipDBpath(false));
+ qDebug("%s -> %s", qPrintable(geoipDBpath(true)), qPrintable(geoipDBpath(false)));
+ if(!QFile::copy(geoipDBpath(true), geoipDBpath(false))) {
+ std::cerr << "ERROR: Failed to copy geoip.dat from executable to hard disk" << std::endl;
+ }
qDebug("Local Geoip database was updated");
}
}
diff --git a/src/geoip.qrc b/src/geoip.qrc
index 50758c4f9..ecd5ebef5 100644
--- a/src/geoip.qrc
+++ b/src/geoip.qrc
@@ -1,5 +1,5 @@
-
-
- geoip/GeoIP.dat
-
-
+
+
+ geoip/GeoIP.dat
+
+
diff --git a/src/misc.cpp b/src/misc.cpp
index 96818a2a6..ac6b75117 100644
--- a/src/misc.cpp
+++ b/src/misc.cpp
@@ -74,6 +74,8 @@ QString misc::QDesktopServicesDataLocation() {
result = QString::fromWCharArray(path);
if (!QCoreApplication::applicationName().isEmpty())
result = result + QLatin1String("\\") + qApp->applicationName();
+ if(!result.endsWith("\\"))
+ result += "\\";
return result;
#else
#ifdef Q_WS_MAC
diff --git a/src/src.pro b/src/src.pro
index 5deaedf32..92785dd91 100644
--- a/src/src.pro
+++ b/src/src.pro
@@ -3,7 +3,7 @@ LANG_PATH = lang
ICONS_PATH = Icons
# Set the following variable to 1 to enable debug
-DEBUG_MODE = 0
+DEBUG_MODE = 1
# Global
TEMPLATE = app
@@ -177,6 +177,12 @@ os2:LIBS += -ltorrent-rasterbar \
}
unix:!macx:contains(DEFINES, WITH_GEOIP_EMBEDDED):message("You chose to embed GeoIP database in qBittorrent executable.")
+# Resource files
+RESOURCES = icons.qrc \
+ lang.qrc \
+ search.qrc \
+ webui.qrc
+
# Add GeoIP resource file if the GeoIP database
# should be embedded in qBittorrent executable
contains(DEFINES, WITH_GEOIP_EMBEDDED) {
@@ -192,12 +198,6 @@ os2:LIBS += -ltorrent-rasterbar \
else:message("GeoIP database will not be embedded in qBittorrent executable.")
}
-# Resource files
-RESOURCES = icons.qrc \
- lang.qrc \
- search.qrc \
- webui.qrc
-
# Translations
TRANSLATIONS = $$LANG_PATH/qbittorrent_fr.ts \
$$LANG_PATH/qbittorrent_zh.ts \