diff --git a/Telegram/SourceFiles/_other/updater_linux.cpp b/Telegram/SourceFiles/_other/updater_linux.cpp index a61b42ae9..4aa70dc7f 100644 --- a/Telegram/SourceFiles/_other/updater_linux.cpp +++ b/Telegram/SourceFiles/_other/updater_linux.cpp @@ -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;