mirror of
https://github.com/clementine-player/Clementine
synced 2025-01-31 03:27:40 +01:00
Fixes lock file removal
This commit is contained in:
parent
80009ea260
commit
3cdca632f9
4
3rdparty/qtsingleapplication/qtlocalpeer.cpp
vendored
4
3rdparty/qtsingleapplication/qtlocalpeer.cpp
vendored
@ -107,6 +107,7 @@ QtLocalPeer::QtLocalPeer(QObject* parent, const QString &appId)
|
||||
+ QLatin1Char('/') + socketName
|
||||
+ QLatin1String("-lockfile");
|
||||
lockFile.setFileName(lockName);
|
||||
lockFileCreated = !lockFile.exists();
|
||||
lockFile.open(QIODevice::ReadWrite);
|
||||
}
|
||||
|
||||
@ -212,5 +213,6 @@ void QtLocalPeer::receiveConnection()
|
||||
|
||||
QtLocalPeer::~QtLocalPeer ()
|
||||
{
|
||||
lockFile.remove();
|
||||
if (lockFileCreated)
|
||||
lockFile.remove();
|
||||
}
|
||||
|
1
3rdparty/qtsingleapplication/qtlocalpeer.h
vendored
1
3rdparty/qtsingleapplication/qtlocalpeer.h
vendored
@ -81,4 +81,5 @@ protected:
|
||||
|
||||
private:
|
||||
static const char* ack;
|
||||
bool lockFileCreated;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user