mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Avoid a crash in the runtime if there are spaces in the users username. Fixes #3227
This commit is contained in:
parent
e467ffcfe4
commit
8232f26882
@ -72,8 +72,7 @@ int main(int argc, char * argv[])
|
|||||||
unsigned long exeHash = sdbm((unsigned char *)argv[0]);
|
unsigned long exeHash = sdbm((unsigned char *)argv[0]);
|
||||||
|
|
||||||
// Create the address file, that will be used to store the appserver URL for this instance
|
// Create the address file, that will be used to store the appserver URL for this instance
|
||||||
addrFileName = homeDir + QString("/.%1.%2.addr").arg(PGA_APP_NAME).arg(exeHash);
|
addrFileName = homeDir + (QString("/.%1.%2.addr").arg(PGA_APP_NAME).arg(exeHash)).remove(" ");
|
||||||
addrFileName.remove(" ");
|
|
||||||
QFile addrFile(addrFileName);
|
QFile addrFile(addrFileName);
|
||||||
|
|
||||||
// Create a system-wide semaphore keyed by app name, exe hash and the username
|
// Create a system-wide semaphore keyed by app name, exe hash and the username
|
||||||
@ -204,8 +203,7 @@ int main(int argc, char * argv[])
|
|||||||
key = key.mid(1, key.length() - 2);
|
key = key.mid(1, key.length() - 2);
|
||||||
|
|
||||||
// Generate the filename for the log
|
// Generate the filename for the log
|
||||||
logFileName = homeDir + QString("/.%1.%2.log").arg(PGA_APP_NAME).arg(exeHash);
|
logFileName = homeDir + (QString("/.%1.%2.log").arg(PGA_APP_NAME).arg(exeHash)).remove(" ");
|
||||||
logFileName.remove(" ");
|
|
||||||
|
|
||||||
// Start the tray service
|
// Start the tray service
|
||||||
TrayIcon *trayicon = new TrayIcon(logFileName);
|
TrayIcon *trayicon = new TrayIcon(logFileName);
|
||||||
|
Loading…
Reference in New Issue
Block a user