Changed comment in Linux updater to better work with Git

This commit is contained in:
Eric Kotato 2020-12-26 20:25:59 +03:00
parent 99b1c1b4b7
commit 9b1a92a192

View file

@ -434,19 +434,21 @@ int main(int argc, char *argv[]) {
customWorkingDir = false;
writeLog("No workdir, trying to figure it out");
// struct passwd *pw = getpwuid(getuid());
// if (pw && pw->pw_dir && strlen(pw->pw_dir)) {
// string tryDir = pw->pw_dir + string("/.TelegramDesktop/");
// struct stat statbuf;
// writeLog("Trying to use '%s' as workDir, getting stat() for tupdates/ready", tryDir.c_str());
// if (!stat((tryDir + "tupdates/ready").c_str(), &statbuf)) {
// writeLog("Stat got");
// if (S_ISDIR(statbuf.st_mode)) {
// writeLog("It is directory, using home work dir");
// workDir = tryDir;
// }
// }
// }
/*
struct passwd *pw = getpwuid(getuid());
if (pw && pw->pw_dir && strlen(pw->pw_dir)) {
string tryDir = pw->pw_dir + string("/.TelegramDesktop/");
struct stat statbuf;
writeLog("Trying to use '%s' as workDir, getting stat() for tupdates/ready", tryDir.c_str());
if (!stat((tryDir + "tupdates/ready").c_str(), &statbuf)) {
writeLog("Stat got");
if (S_ISDIR(statbuf.st_mode)) {
writeLog("It is directory, using home work dir");
workDir = tryDir;
}
}
}
*/
if (workDir.empty()) {
workDir = exePath;