Comparar commits

...

4 Commits

Autor SHA1 Mensagem Data
Klaas Freitag 08dd9796d1 HACK to avoid continuation: See task #1448
We do not know the _modtime from the server, at this point, so just set
the current one.  (rather than the one locally)
2014-04-04 10:50:40 +02:00
Sandro Knauß 47274f1075 Merge remote-tracking branch 'respect-XDG_CONFIG_HOME' into 1.5 2014-03-21 17:20:15 +01:00
Markus Goetz f72e1cc837 Log: Don't override level for csync
The level shall be set from Folder or owncloudCmd only.
2014-03-21 13:52:35 +01:00
hefee 4e0496f74d respect XDG_CONFIG_HOME for getting user config dir.
Under linux the XDG Base Directory Specification define different
enviroment variables where to store what.
2013-12-31 02:10:44 +01:00
4 arquivos alterados com 21 adições e 5 exclusões
-2
Ver Arquivo
@@ -490,8 +490,6 @@ void CSyncThread::startSync()
// }
// csync_set_auth_callback( _csync_ctx, getauth );
csync_set_log_callback( csyncLogCatcher );
csync_set_log_level( 11 );
_syncTime.start();
+4
Ver Arquivo
@@ -122,6 +122,10 @@ bool PropagateItemJob::checkForProblemsWithShared(const QString& msg)
} else if (downloadItem._instruction == CSYNC_INSTRUCTION_SYNC) {
// we modified the file locally, jsut create a conflict then
downloadItem._instruction = CSYNC_INSTRUCTION_CONFLICT;
// HACK to avoid continuation: See task #1448: We do not know the _modtime from the
// server, at this point, so just set the current one. (rather than the one locally)
downloadItem._modtime = Utility::qDateTimeToTime_t(QDateTime::currentDateTime());
} else {
// the file was removed or renamed, just recover the old one
downloadItem._instruction = CSYNC_INSTRUCTION_SYNC;
+16 -3
Ver Arquivo
@@ -26,17 +26,30 @@ static void setupFavLink_private(const QString &folder) {
}
}
// returns the autostart directory the linux way
// and respects the XDG_CONFIG_HOME env variable
// can be replaces for qt5 with QStandardPaths
QString getUserAutostartDir_private()
{
QString config = QLatin1String(qgetenv("XDG_CONFIG_HOME"));
if (config.isEmpty()) {
config = QDir::homePath()+QLatin1String("/.config");
}
config += QLatin1String("/autostart/");
return config;
}
bool hasLaunchOnStartup_private(const QString &appName)
{
QString userAutoStartPath = QDir::homePath()+QLatin1String("/.config/autostart/");
QString desktopFileLocation = userAutoStartPath+appName+QLatin1String(".desktop");
QString desktopFileLocation = getUserAutostartDir_private()+appName+QLatin1String(".desktop");
return QFile::exists(desktopFileLocation);
}
void setLaunchOnStartup_private(const QString &appName, const QString& guiName, bool enable)
{
QString userAutoStartPath = QDir::homePath()+QLatin1String("/.config/autostart/");
QString userAutoStartPath = getUserAutostartDir_private();
QString desktopFileLocation = userAutoStartPath+appName+QLatin1String(".desktop");
if (enable) {
if (!QDir().exists(userAutoStartPath) && !QDir().mkdir(userAutoStartPath)) {
+1
Ver Arquivo
@@ -126,6 +126,7 @@ int main(int argc, char **argv) {
qFatal("ne_sock_init failed!");
}
csync_set_log_callback( csyncLogCatcher );
csync_set_log_level(11);
csync_enable_conflictcopys(_csync_ctx);
Logger::instance()->setLogFile("-");