2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-01 23:25:15 +00:00

improved os x updater

This commit is contained in:
John Preston
2014-11-27 21:20:48 +03:00
parent ecc6899b42
commit d62d5908d1
10 changed files with 65 additions and 19 deletions

View File

@@ -800,13 +800,23 @@ QString psCurrentExeDirectory(int argc, char *argv[]) {
if (!first.isEmpty()) {
QFileInfo info(first);
if (info.exists()) {
QDir result(info.absolutePath());
return result.absolutePath() + '/';
return QDir(info.absolutePath()).absolutePath() + '/';
}
}
return QString();
}
QString psCurrentExeName(int argc, char *argv[]) {
QString first = argc ? QString::fromLocal8Bit(argv[0]) : QString();
if (!first.isEmpty()) {
QFileInfo info(first);
if (info.exists()) {
return info.fileName();
}
}
return QString();
}
void psDoCleanup() {
try {
psAutoStart(false, true);