mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-26 06:55:59 +03:00
Fix favlink generation on windows
This commit is contained in:
parent
01a8ab7bf0
commit
aca965f111
1 changed files with 2 additions and 2 deletions
|
@ -159,8 +159,8 @@ void FolderMan::setupFavLink(const QString &folder)
|
|||
wchar_t path[MAX_PATH];
|
||||
SHGetSpecialFolderPath(0, path, CSIDL_PROFILE, FALSE);
|
||||
QString profile = QDir::fromNativeSeparators(QString::fromWCharArray(path));
|
||||
QString folderName = QDir::fromNativeSeparators(folder.mid(folder.lastIndexOf('/')));
|
||||
QString linkName = profile+QLatin1String("/Links/") + folderName + QLatin1String(".lnk");
|
||||
QDir folderDir(QDir::fromNativeSeparators(folder));
|
||||
QString linkName = profile+QLatin1String("/Links/") + folderDir.dirName() + QLatin1String(".lnk");
|
||||
if (!QFile::link(folder, linkName))
|
||||
qDebug() << Q_FUNC_INFO << "linking" << folder << "to" << linkName << "failed!";
|
||||
#elif defined (Q_OS_MAC)
|
||||
|
|
Loading…
Reference in a new issue