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;
|
||||
|
||||
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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue