Changed comment in Linux updater to better work with Git
This commit is contained in:
parent
99b1c1b4b7
commit
9b1a92a192
1 changed files with 15 additions and 13 deletions
|
|
@ -434,19 +434,21 @@ int main(int argc, char *argv[]) {
|
||||||
customWorkingDir = false;
|
customWorkingDir = false;
|
||||||
|
|
||||||
writeLog("No workdir, trying to figure it out");
|
writeLog("No workdir, trying to figure it out");
|
||||||
// struct passwd *pw = getpwuid(getuid());
|
/*
|
||||||
// if (pw && pw->pw_dir && strlen(pw->pw_dir)) {
|
struct passwd *pw = getpwuid(getuid());
|
||||||
// string tryDir = pw->pw_dir + string("/.TelegramDesktop/");
|
if (pw && pw->pw_dir && strlen(pw->pw_dir)) {
|
||||||
// struct stat statbuf;
|
string tryDir = pw->pw_dir + string("/.TelegramDesktop/");
|
||||||
// writeLog("Trying to use '%s' as workDir, getting stat() for tupdates/ready", tryDir.c_str());
|
struct stat statbuf;
|
||||||
// if (!stat((tryDir + "tupdates/ready").c_str(), &statbuf)) {
|
writeLog("Trying to use '%s' as workDir, getting stat() for tupdates/ready", tryDir.c_str());
|
||||||
// writeLog("Stat got");
|
if (!stat((tryDir + "tupdates/ready").c_str(), &statbuf)) {
|
||||||
// if (S_ISDIR(statbuf.st_mode)) {
|
writeLog("Stat got");
|
||||||
// writeLog("It is directory, using home work dir");
|
if (S_ISDIR(statbuf.st_mode)) {
|
||||||
// workDir = tryDir;
|
writeLog("It is directory, using home work dir");
|
||||||
// }
|
workDir = tryDir;
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
|
}
|
||||||
|
*/
|
||||||
if (workDir.empty()) {
|
if (workDir.empty()) {
|
||||||
workDir = exePath;
|
workDir = exePath;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue