Read sync-exclude.lst from /etc/ownCloud, renamed from exclude.lst.
This commit is contained in:
Родитель
e4024015a4
Коммит
d09693f191
|
@ -99,8 +99,8 @@ if(UNIT_TESTING)
|
|||
endif(UNIT_TESTING)
|
||||
|
||||
if(BUILD_OWNCLOUD_OSX_BUNDLE)
|
||||
install( FILES exclude.lst DESTINATION ${OWNCLOUD_OSX_BUNDLE}/Contents/Resources )
|
||||
install( FILES sync-exclude.lst DESTINATION ${OWNCLOUD_OSX_BUNDLE}/Contents/Resources )
|
||||
else()
|
||||
install( FILES exclude.lst DESTINATION ${CMAKE_INSTALL_SYSCONFDIR} )
|
||||
install( FILES sync-exclude.lst DESTINATION ${CMAKE_INSTALL_SYSCONFDIR} )
|
||||
endif()
|
||||
|
||||
|
|
|
@ -351,7 +351,7 @@ Section "${APPLICATION_NAME}" SEC_OWNCLOUD
|
|||
|
||||
; CSync configs
|
||||
File "${CSYNC_CONFIG_DIR}/csync.conf"
|
||||
File "${SOURCE_PATH}/exclude.lst"
|
||||
File "${SOURCE_PATH}/sync-exclude.lst"
|
||||
|
||||
SectionEnd
|
||||
|
||||
|
|
|
@ -50,27 +50,33 @@ QString MirallConfigFile::configPath() const
|
|||
|
||||
QString MirallConfigFile::excludeFile() const
|
||||
{
|
||||
const QString exclFile(QLatin1String("exclude.lst"));
|
||||
QString dir = configPath();
|
||||
dir += exclFile;
|
||||
// prefer sync-exclude.lst, but if it does not exist, check for
|
||||
// exclude.lst for compatibility reasonsin the user writeable
|
||||
// directories.
|
||||
const QString exclFile("sync-exclude.lst");
|
||||
|
||||
QFileInfo fi( dir );
|
||||
if( fi.isReadable() ) {
|
||||
return dir;
|
||||
QFileInfo fi;
|
||||
fi.setFile( configPath(), exclFile );
|
||||
|
||||
if( ! fi.isReadable() ) {
|
||||
fi.setFile( configPath(), QLatin1String("exclude.lst") );
|
||||
}
|
||||
|
||||
// Check alternative places...
|
||||
if( ! fi.isReadable() ) {
|
||||
#ifdef Q_OS_WIN32
|
||||
fi.setFile( QApplication::applicationDirPath(), exclFile );
|
||||
fi.setFile( QApplication::applicationDirPath(), exclFile );
|
||||
#endif
|
||||
#ifdef Q_OS_LINUX
|
||||
fi.setFile( QString("/etc"), exclFile );
|
||||
fi.setFile( QString("/etc/%1").arg(Theme::instance()->appName()), exclFile );
|
||||
#endif
|
||||
#ifdef Q_OS_MAC
|
||||
// exec path is inside the bundle
|
||||
fi.setFile( QApplication::applicationDirPath(),
|
||||
QLatin1String("../Resources/") + exclFile );
|
||||
// exec path is inside the bundle
|
||||
fi.setFile( QApplication::applicationDirPath(),
|
||||
QLatin1String("../Resources/") + exclFile );
|
||||
#endif
|
||||
}
|
||||
|
||||
if( fi.isReadable() ) {
|
||||
qDebug() << " ==> returning exclude file path: " << fi.absoluteFilePath();
|
||||
return fi.absoluteFilePath();
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
*.filepart
|
||||
*~
|
||||
*.bak
|
||||
*.part
|
||||
|
||||
*.unison*
|
||||
*csync_timedif.ctmp*
|
||||
.*.sw?
|
||||
.*.*sw?
|
||||
|
||||
.DS_Store
|
||||
.ds_store
|
||||
desktop.ini
|
||||
Thumbs.db
|
||||
|
||||
*.kate-swp
|
||||
*.aux
|
||||
*.nav
|
||||
*.out
|
||||
*.toc
|
||||
|
||||
*_conflict-*
|
||||
|
||||
|
Загрузка…
Ссылка в новой задаче