зеркало из https://github.com/nextcloud/desktop.git
SyncEngine: Use exclude file fallback next to binary on linux.
This is mainly useful for developers where the system-wide exclude file may not exist.
This commit is contained in:
Родитель
cf881aa6dc
Коммит
aef569ee9d
|
@ -161,4 +161,5 @@ if(BUILD_OWNCLOUD_OSX_BUNDLE)
|
|||
configure_file(sync-exclude.lst ${OWNCLOUD_OSX_BUNDLE}/Contents/Resources/sync-exclude.lst COPYONLY)
|
||||
else()
|
||||
install( FILES sync-exclude.lst DESTINATION ${SYSCONFDIR}/${APPLICATION_SHORTNAME} )
|
||||
configure_file(sync-exclude.lst bin/sync-exclude.lst COPYONLY)
|
||||
endif()
|
||||
|
|
|
@ -233,6 +233,14 @@ QString MirallConfigFile::excludeFile(Scope scope) const
|
|||
#endif
|
||||
#ifdef Q_OS_UNIX
|
||||
fi.setFile( QString( SYSCONFDIR "/%1").arg(Theme::instance()->appName()), exclFile );
|
||||
if ( ! fi.exists() )
|
||||
{
|
||||
// Prefer to return the preferred path! Only use the fallback location
|
||||
// if the other path does not exist and the fallback is valid.
|
||||
QFileInfo next_to_binary( QCoreApplication::applicationDirPath(), exclFile );
|
||||
if (next_to_binary.exists())
|
||||
fi = next_to_binary;
|
||||
}
|
||||
#endif
|
||||
#ifdef Q_OS_MAC
|
||||
// exec path is inside the bundle
|
||||
|
|
Загрузка…
Ссылка в новой задаче