diff options
author | Klaas Freitag <freitag@owncloud.com> | 2013-11-25 21:22:41 +0400 |
---|---|---|
committer | Klaas Freitag <freitag@owncloud.com> | 2013-11-26 17:02:11 +0400 |
commit | 7a3c086be251f59dd9aef3b31a479dbe753cba85 (patch) | |
tree | 6637a95e8e7e00949fcb2e838d8ed45b62528a8d /src/mirall | |
parent | 5c8b6ed9027d8ff8d49ad228501218dc9a3cb2a6 (diff) |
Display a proper error message for missing sync directory on server.
this fixes bug mirall#1149
Diffstat (limited to 'src/mirall')
-rw-r--r-- | src/mirall/csyncthread.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/mirall/csyncthread.cpp b/src/mirall/csyncthread.cpp index d894a837d..52bcfde67 100644 --- a/src/mirall/csyncthread.cpp +++ b/src/mirall/csyncthread.cpp @@ -158,7 +158,7 @@ QString CSyncThread::csyncErrorToString(CSYNC_STATUS err) errStr = tr("CSync failed due to not handled permission deniend."); break; case CSYNC_STATUS_NOT_FOUND: - errStr = tr("CSync failed to find a specific file."); + errStr = tr("CSync failed to access "); // filename gets added. break; case CSYNC_STATUS_FILE_EXISTS: errStr = tr("CSync tried to create a directory that already exists."); @@ -357,8 +357,16 @@ void CSyncThread::handleSyncError(CSYNC *ctx, const char *state) { const char *errMsg = csync_get_status_string( ctx ); QString errStr = csyncErrorToString(err); if( errMsg ) { + if( !errStr.endsWith(" ")) { + errStr.append(" "); + } errStr += QString::fromUtf8(errMsg); } + + // if there is csyncs url modifier in the error message, replace it. + if( errStr.contains("ownclouds://") ) errStr.replace("ownclouds://", "https://"); + if( errStr.contains("owncloud://") ) errStr.replace("owncloud://", "http://"); + qDebug() << " #### ERROR during "<< state << ": " << errStr; if( CSYNC_STATUS_IS_EQUAL( err, CSYNC_STATUS_ABORTED) ) { |