1
0
mirror of https://github.com/chylex/Nextcloud-Desktop.git synced 2024-10-19 22:42:45 +02:00
Commit Graph

2041 Commits

Author SHA1 Message Date
Olivier Goffart
462ba7d942 Don't dead lock when all the files are removed
SyncEngine is on the main thread, no need of the legacy BlockingConnection
2014-04-03 17:47:49 +02:00
Klaas Freitag
cf87fdff7f Keep the updater data in the log struct for the synclog.
Also, shorten the timestamp and add the sync direction.
2014-04-03 16:56:50 +02:00
Markus Goetz
565bb540d6 Propagator: Add debug message regarding legacy vs QNAM 2014-04-03 16:37:40 +02:00
Olivier Goffart
eaf5681f61 Put the sync log in the actual folder 2014-04-02 16:36:32 +02:00
Olivier Goffart
03ef2aadde Remove undeeded includes
And don't use 'using namespace' in headers
2014-04-02 16:23:57 +02:00
Olivier Goffart
f09076180d don't add the list of field on the log for every sync 2014-04-02 16:21:07 +02:00
Olivier Goffart
d5d3c1a23a Fix compilation with Qt5
We don't need QtWidgets,  and we don't need Uility::escape
2014-04-02 16:21:06 +02:00
Markus Goetz
b18f1ad386 SyncEngine: Removed unused signal 2014-04-02 12:47:15 +02:00
Klaas Freitag
8625ec250b Add a trust ssl certificate switch 2014-04-01 16:14:24 +02:00
Klaas Freitag
d731f4718d Add an simple SSL error handler for owncloudcmd. 2014-04-01 16:14:24 +02:00
Olivier Goffart
607e48a68b let configure the default count of the blacklist 2014-04-01 13:54:47 +02:00
Olivier Goffart
bfe6a50b19 Fix some error cases in the SyncEngine
Always cleanup properly when we bail out.

Also fix thread safety of the SyncJournalDB
2014-04-01 13:41:47 +02:00
Olivier Goffart
3acdfc0004 Make configurable the maximum amount of job in parallel
Bia the environement variable OWNCLOUD_MAX_PARALLEL
2014-03-28 11:20:07 +01:00
Olivier Goffart
a1fc7f0a25 Make the chunk size configurable via an environement variable
OWNCLOUD_CHUNK_SIZE
2014-03-28 11:11:02 +01:00
Olivier Goffart
8de9bec122 Remove progress info from csync
csync doesn't do no propagation no more
2014-03-28 10:50:15 +01:00
Olivier Goffart
765a18b74a Fix compilation with Qt4 2014-03-28 10:26:42 +01:00
Olivier Goffart
350283fe06 Remove obsolete code that removed the sync journal when the sync directory is deleted
Since the journal is now in the same directory, we don't need this
security anymore

When the directory is removed, the sync will error out saying that the
journal cannot be loaded or created
2014-03-28 10:23:09 +01:00
Olivier Goffart
2ba62b79b4 Make the size of the log maximum 1MiB 2014-03-28 10:13:35 +01:00
Olivier Goffart
e0b6395d18 Use sane datastructure in Utility::StopWatch
We don't want to logging to be O(N^2)

Also avoid usage of macro when possible
2014-03-28 09:50:13 +01:00
Olivier Goffart
ba896b0550 Avoid copies of the StopWatch 2014-03-28 09:39:50 +01:00
Olivier Goffart
36a2c861c2 Only build the static library when BUILD_LIBRARIES_ONLY is defined 2014-03-28 09:34:21 +01:00
Olivier Goffart
7f975e0b2f Avoid macro when it can easily be done with a local variable 2014-03-28 09:27:05 +01:00
Olivier Goffart
69fcbd3b0d Fix Qt4 compilation
And a typo
2014-03-27 18:19:56 +01:00
Olivier Goffart
d6525a979d Do not let user change it's login while using shibbolet
Fixes #915
2014-03-27 17:59:50 +01:00
Markus Goetz
54313338cd SyncEngine: new aboutToPropagate signal 2014-03-27 17:04:31 +01:00
Markus Goetz
09e6207ce9 SyncEngine: Fix typo 2014-03-27 15:19:02 +01:00
Denis Dzyubenko
000e0bb600 Fast forwarded qtmacgoodies 2014-03-27 10:39:56 +01:00
Olivier Goffart
de2335c1db Show the folders when in the accountsettings in the first start 2014-03-26 19:31:37 +01:00
Olivier Goffart
332c6cf726 Fix invalid signal connection 2014-03-26 19:31:37 +01:00
Klaas Freitag
086dd07d69 Log the processed items to a logfile. 2014-03-26 18:16:27 +01:00
Klaas Freitag
dd6b71bad6 Use a stopwatch to meassure the time consumed. 2014-03-26 18:16:27 +01:00
Klaas Freitag
9af2339596 Store the request duration and timestamp to final item 2014-03-26 18:16:27 +01:00
Klaas Freitag
0fcef5f604 Add data to store interesting info from the sync run (other tree) 2014-03-26 18:16:27 +01:00
Klaas Freitag
c41935d49d Add a class to write a machine readable sync log file. 2014-03-26 18:16:27 +01:00
Klaas Freitag
7b84defd56 Add a stopwatch utility class with lap times.
Allows to meassure the duration of something that started at a
point of time, with some small convenience methods.
2014-03-26 18:16:27 +01:00
Klaas Freitag
505429b582 Add a duration and the repsonse timestamp to the jobs. 2014-03-26 18:16:27 +01:00
Klaas Freitag
11bbad79e2 Use QTimer as object member rather than pointer based.
Avoid crashes if timer is zero.
2014-03-26 18:16:27 +01:00
Klaas Freitag
6e6f647c63 Change data type for fileId to QByteArray. 2014-03-26 18:12:22 +01:00
Olivier Goffart
2ad7b0aae0 Fix crash on first run when no account are configured 2014-03-26 17:42:05 +01:00
Olivier Goffart
588633a0f2 Fix leak: don't leak the settings 2014-03-26 17:42:05 +01:00
Markus Goetz
d5659442b2 SyncEngine: Sanity bail out if DB does not exist suddenly
The update/reconcile worked for me, but the Propagate step had an invalid DB
path but still went on (and then messed things up)
2014-03-26 16:57:50 +01:00
Markus Goetz
c6e5f39f7f SyncJournalDb: Verbose log on load failure 2014-03-26 16:40:00 +01:00
Olivier Goffart
38344589c4 Exxtract the exception message from reply to PUT
Might be usefull to debug Internal Server Error

Fixes #1366
2014-03-26 12:02:22 +01:00
Denis Dzyubenko
6c28151e0f Fast forwarded qtmacgoodies submodule 2014-03-26 10:15:35 +01:00
Daniel Molkentin
1c4af687ea Compile on Mac again 2014-03-26 07:20:24 +01:00
Daniel Molkentin
c3d37efa6c Fix OS X compilation 2014-03-25 23:33:46 +01:00
Daniel Molkentin
3ac1849963 Don't moc twice 2014-03-25 20:55:04 +01:00
Olivier Goffart
b4f992b944 Merge pull request #1446 from owncloud/remove-tooltip
remove superfluous tooltip from server address input field
2014-03-25 20:16:26 +01:00
Daniel Molkentin
45ec489f71 Merge branch 'master' of github.com:shadone/mirall into shadone-master
Conflicts:
	cmake/modules/QtVersionAbstraction.cmake
	src/CMakeLists.txt
	src/mirall/owncloudgui.cpp
2014-03-25 19:56:45 +01:00
Daniel Molkentin
e2fe4972d9 Don't show ocsync version, it's part of mirall now 2014-03-25 19:04:05 +01:00
Mathieu Arnold
84b4872938 And make it runnable on FreeBSD too.
Patch by:	Tobias Berner
2014-03-25 17:23:11 +01:00
Mathieu Arnold
3f9bd1d72a Fix build on FreeBSD.
We use libinotify, so the linux folderwatcher works.

Based on a patch by:	Tobias Berner
2014-03-25 17:22:54 +01:00
Markus Goetz
91f416ffc7 Fix compile after changing Account::davPath() 2014-03-22 09:41:32 +01: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
ff95cbd04b Account: Don't hardcode WebDAV path 2014-03-21 17:14:04 +01:00
Markus Goetz
cc5fabdab0 Engine: Introduce jobCompleted() signal 2014-03-21 17:13:02 +01:00
Markus Goetz
ff95e233bc Token Credentials: Support actual tokens 2014-03-21 17:12:26 +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
Olivier Goffart
8e6674e784 Merge branch '1.5'
Conflicts:
	src/owncloudcmd/owncloudcmd.cpp
2014-03-21 10:06:45 +01:00
Olivier Goffart
8aace3284f owncloudcmd: Fix an error during update phase would not terminate
the QApplication::quit()  would be run before the exec() and would
be a noop,   and then exec would just wait forever.
2014-03-21 10:03:11 +01:00
Olivier Goffart
bb9d6b34c7 Remove FIXME and TODO
They are outdated
2014-03-20 16:42:43 +01:00
Olivier Goffart
07025c7432 Remove a FIXME
The commit message say that this line should be necessary to show
the information when the setting dialog is open,  but this is working
now via the signals
2014-03-20 16:42:43 +01:00
Olivier Goffart
b65601aaa4 Remove FIXME
This has been refactored since the comment was added and is no longer a hack
2014-03-20 16:42:43 +01:00
Olivier Goffart
756e1c4a12 Prefer the use of _isDirectory over item._type == SyncFileItem::Directory 2014-03-20 16:42:42 +01:00
Olivier Goffart
c5f8a2555d Rename _dir to _direction
(to avoid confusion with directory)
2014-03-20 16:42:42 +01:00
Olivier Goffart
a1ab9c84c7 Remove FIXME in syncengine 2014-03-20 16:42:42 +01:00
Olivier Goffart
23f3a6b319 restore the last change menu
It was not yet implemented after the progress refactoring
2014-03-20 14:43:10 +01:00
Olivier Goffart
ebeb668a62 QNAM jobs: Make sure there is an etag is proper and not changed when one resume
Those tests are existing on the legacy jobs.

We check there is an etag so we make sure a proxy is not in between.
(We have seen user complaining because their proxy is replacing the
pages with one that says they need to enter their login and password)

Also it is important to check that the etag has not changed if we resume
(this may happen if the file is changed on the server between the update
phase and the propagate phase,  and that we resume this file)
2014-03-20 13:31:42 +01:00
Klaas Freitag
ca536f467a Proper initialization to avoid build warnings. 2014-03-20 12:35:16 +01:00
Olivier Goffart
05d3273591 Detect the error that may happen when downloading a file 2014-03-20 11:35:30 +01:00
Daniel Molkentin
eef57032f8 OCUpdater: Compare to the current version
Fixes #1548
2014-03-18 00:28:26 +01:00
Olivier Goffart
6377dca4b0 Add the file and line number of the debug in the debug view 2014-03-17 12:15:45 +01:00
Olivier Goffart
f05320c32c Clean the debug a bit 2014-03-17 12:15:16 +01:00
Olivier Goffart
b0f8a24c20 CSyncThread was renamed, give proper names in Folder
take in account that the object live in the same thread
2014-03-17 11:47:23 +01:00
Olivier Goffart
c841b9c0c4 Remove unused libsync_HEADERS
This was unused and is redudent with owncloudsync_HEADERS
2014-03-17 11:36:53 +01:00
Olivier Goffart
7b482c0e96 Rename CSyncThread to SyncEngine
CSyncThread has not been a thread for a long time now
2014-03-17 11:34:51 +01:00
Olivier Goffart
bf5091d862 Merge branch '1.5' 2014-03-17 11:26:28 +01:00
Olivier Goffart
5c45ede4a5 Read the quota as double
The server is sending floating point number when the amount of storage
is set to a custom number (say 1.2GB)

This should fix #1374
2014-03-17 10:37:06 +01:00
Olivier Goffart
cabcdd890e Only run the CheckQuota job if the account is connected
We use another job to check the connection.
And this may cause wrong password failure as we are still in the wizzard

Fixes #1567
2014-03-17 10:35:43 +01:00
Olivier Goffart
0a5e691ba3 Remove debug output that might cause a crash
The account may not be finilized when this is called while the
wizzard is still running on first connection
2014-03-17 10:22:14 +01:00
Olivier Goffart
ba300c2fc1 Fix memory leak: Don't use raw pointers 2014-03-17 10:04:42 +01:00
Olivier Goffart
62e95e540b Remove Progress::Kind
It's not really used,  one need to  look at the instruction of the items
being processed to see what happens
2014-03-14 18:43:23 +01:00
Olivier Goffart
d744b5e481 Fix the file count in the progress
And clear the ignored files between syncs
2014-03-14 18:29:23 +01:00
Olivier Goffart
f9b82d852c Do not destroy the settings dialog when it is hidden.
That way the protocol widget stay filled.
And the state is kept
2014-03-14 17:39:20 +01:00
Olivier Goffart
33289bde29 Merge remote-tracking branch 'origin/1.5'
Conflicts:
	CMakeLists.txt
	VERSION.cmake
	src/CMakeLists.txt
2014-03-14 17:27:50 +01:00
Olivier Goffart
9053662fe8 remove Progress::SyncProblem and the problem slots
They are merged into normal progress
2014-03-14 17:18:26 +01:00
Markus Goetz
07904e078a CSyncThread: Emit a signal for each file before propagate
This can be used to display info before the sync is happening
2014-03-14 14:08:32 +01:00
Olivier Goffart
aacc278583 Refactor the progress
Consider that there might be several files processed at the same time
2014-03-14 13:32:32 +01:00
Daniel Molkentin
87f3755b1f Deploy with Qt5 2014-03-13 00:52:01 +01:00
Markus Goetz
a2467b5dea CMake: Do options one directory above
This fixes linking when keychain was not desired.
2014-03-12 14:20:38 +01:00
Denis Dzyubenko
aee4c06b8d Renamed a member variable to have underscore prefix for consistency 2014-03-11 20:34:00 +01:00
Denis Dzyubenko
89a4833cae Fixed a memory leak in FSEvents folderwatcher backend 2014-03-11 20:34:00 +01:00
Denis Dzyubenko
255d255217 Fixed ignored paths matching on OS X.
We now listen to changes to files and when an event is received we first match
the file name to the "ignored paths list" and only if the the file that was
changed didn't match figure out which directory needs to be synced.
2014-03-11 20:34:00 +01:00
Denis Dzyubenko
902de2dc93 Fixed a memory leak in FSEvents file system watcher 2014-03-11 20:34:00 +01:00
Denis Dzyubenko
f7c075099b Removed bogus commented out line 2014-03-11 20:34:00 +01:00
Markus Goetz
0bbcee7354 CMake: Fix else 2014-03-11 17:56:29 +01:00
Markus Goetz
8a18cf811e CMake: Fix warning 2014-03-11 17:33:45 +01:00
Markus Goetz
4e7e25c569 Improve libowncloudsync
* Introduce TokenCredentials
* Introduce static compiling
* Have compile flags for smaller compile
2014-03-11 17:05:44 +01:00
Klaas Freitag
bc41e6bc99 Allow proper translation for sync activity through GuiLog.
This fixes bug #1550
2014-03-11 10:55:20 +01:00
Klaas Freitag
c8a8eb35fa Disable the folder if it is going to be removed. 2014-03-10 12:22:06 +01:00
Klaas Freitag
8bf2c54b56 Install include dirs app name aware. 2014-03-07 13:05:17 +01:00
Olivier Goffart
7cab77e879 Call the start method assyncroniously
That was my intention, which is why i did not do a direct call to start.

This should fix issue #1536
2014-03-06 21:01:08 +01:00
Olivier Goffart
feb49b2768 Saner defaults 2014-03-06 20:34:11 +01:00
Olivier Goffart
4e25595520 Better error classification 2014-03-06 20:33:17 +01:00
Olivier Goffart
4aaa256b11 Do not beleive that the credidential are wrong when the job is cancelled
Otherwise, aborting the sync will make the client beleive the credidentials
are wrong.
2014-03-06 20:31:48 +01:00
Markus Goetz
630f61142a Proxy: Try to fix issue
See eb7074e9f0 for discussion
2014-03-06 17:48:18 +01:00
Olivier Goffart
ac393c6374 Do not sent more chunk and cancel the upload when the file change while uploading chunks 2014-03-06 16:04:32 +01:00
Olivier Goffart
5e012366ab Keep string translatable
(In french, one may want to add a space before the colon.
Other languages may want to change the order)

Also use the two argument version of arg() to avoid issues if the first
string contains a '%1' sign
2014-03-06 15:01:34 +01:00
Olivier Goffart
ed1294d668 Avoid double delete 2014-03-06 14:28:58 +01:00
Olivier Goffart
ed2316a53f Add missing line break
(silent warning)
2014-03-06 14:10:42 +01:00
Olivier Goffart
e5a8cd4521 Merge branch '1.5'
Conflicts:
	VERSION.cmake
2014-03-06 14:10:08 +01:00
Jan-Christoph Borchardt
5ce4763868 move percent indicator of space usage to correct location 2014-03-05 12:55:32 +01:00
Jan-Christoph Borchardt
bafc90cfd8 clarify which space is used, fix #1517 2014-03-05 12:54:47 +01:00
Klaas Freitag
66b152ac69 Remove left over member variables. 2014-03-03 18:12:12 +01:00
Olivier Goffart
6df00ad08c Only removes the password from the credidentials if it has been fetched before
Also only run the propfind job if the credidentials are readon, and fetch them
otherwise
2014-03-03 17:55:15 +01:00
Olivier Goffart
76b24ff00d Revert "Do not wipe the credentials from config for reconnect."
This reverts commit 9eb3452a71.

We need that or wrong password can never be changed
2014-03-03 17:21:20 +01:00
Olivier Goffart
60a1d50ec9 Keep the rentrency flag when asking the user for the password 2014-03-03 17:16:57 +01:00
Klaas Freitag
9eb3452a71 Do not wipe the credentials from config for reconnect.
This should fix bug #1491
2014-03-03 16:39:38 +01:00
Klaas Freitag
228de7eede Make the CheckServerJob ignoring credential fails. 2014-03-03 16:37:29 +01:00
Klaas Freitag
2164f5d9b7 Remove a superflous MessageBox. User is asked for Password instead. 2014-03-03 16:36:59 +01:00
Klaas Freitag
4240010046 Add method clearCookieJar which wipes QNAMs cookies. 2014-03-03 16:36:30 +01:00
Klaas Freitag
1eb0875518 Use the mirall config file for all Keychain jobs.
Also set the job as parent to get proper deletion of the
settings object.
2014-03-03 16:35:57 +01:00
Klaas Freitag
b8e52304bd Do proper initialization of _fetchJobInProgress.
That confused win32, since this flag was true very often.
2014-03-03 16:33:59 +01:00
Olivier Goffart
0658802048 Fix layout of the network tab
Fixes #1491
2014-02-28 13:17:04 +01:00
Olivier Goffart
eeb68919bf Do not erase the username and password from the config if we never connected
If we never fetched the credidentials, the _user and _password will be empty,
we should therefore not try to save them because it would just erase them.

Version 1.5.2 always try to fetch the creds at startup.  But now we only
do it if we detect an internet connection
2014-02-28 12:51:06 +01:00
Olivier Goffart
9a60732542 Do not erase the full account config if an old version of the client stored the password 2014-02-28 12:51:06 +01:00
Daniel Molkentin
36cd9d9ced Shibboleth: Move browser window to the offset of the setup wizard 2014-02-27 17:07:59 +01:00
Daniel Molkentin
9c70ee68d2 Mask password lineedit 2014-02-27 17:07:59 +01:00
Olivier Goffart
e809a59049 Remove spurious error message.
Sometimes 'success' is false without apparent reason.
Just remove the message
2014-02-27 17:03:42 +01:00
Olivier Goffart
96c535d712 Make the parrallel uploaded also check for problem in Shared 2014-02-27 14:13:22 +01:00
Markus Goetz
a652fec5a0 csync: Remove more unused stuff 2014-02-27 13:33:22 +01:00
Daniel Molkentin
33ae2eb19f Try to handle auth requests by a Shibboleth IdP 2014-02-27 13:18:53 +01:00
Olivier Goffart
d4fa955950 Don't fetch credidentials from application.cpp
They will be fetched by the connection validator after doing
the status.php check
2014-02-27 13:06:29 +01:00
Olivier Goffart
869793592d Merge branch '1.5'
Conflicts:
	VERSION.cmake
	src/mirall/owncloudpropagator.cpp
	src/mirall/owncloudpropagator.h
2014-02-27 11:40:34 +01:00
Daniel Molkentin
d4dd5afbe7 Revert "Make "Sign Out" forget the cookies"
This reverts commit 8607300195.

This approach is too dangerous for 1.5.2.
2014-02-26 15:05:15 +01:00
Olivier Goffart
8607300195 Make "Sign Out" forget the cookies
If we keep the cookies, next time we sign in, the entered password
does not matter as the server still think our session is logged in.
2014-02-26 13:23:52 +01:00
Olivier Goffart
e468ea2d68 Avoid re-entrency in HTTPCredidential::fetch
It is likely to re-enter if there is two jobs that asks for a password.

Example:
 1. log out
 2. restart the application
 3. enter a wrong password
 4. enter a wrong password again a few times
 5. enter the correct password
 6. it should must not prompt for the password again.

Because of the re-entrency, it was still prompting for the password several
times after the right password had been entered
2014-02-26 13:10:11 +01:00
Daniel Molkentin
05a1f7b1bb Another fix for the reconnect-logic 2014-02-26 11:26:50 +01:00
Markus Goetz
c7e70533a0 Shibboleth: Detect also QNAM redirects
If a QNAM job (e.g. Quota or ETag job) gets redirected,
we'll invalidate and then prompt to re-fetch the credentials
from the user.
(The keychain credentials will be wrong so they get deleted)
2014-02-25 14:22:55 +01:00
Markus Goetz
065690c2ce Shibboleth: Have proper invalidation if timeout during sync 2014-02-25 09:33:28 +01:00
Markus Goetz
b56843ead2 Account: Fix Metatype registratition 2014-02-24 15:31:11 +01:00
Markus Goetz
51b5f3c9b2 Propfind Job: Print redirect URL in log 2014-02-24 15:20:49 +01:00
Daniel Molkentin
7f508c0718 Account needs qRegisterMetaType 2014-02-24 14:56:57 +01:00
Daniel Molkentin
45a7d4ff4c Fix Wizard when returning from later steps
We need to reset the credential type when
returning to the first page from later steps.
Otherwise, unfinished credential instances
and their NAM will try to fetch data, which
will fail with weird symptoms.
2014-02-24 14:56:57 +01:00
Daniel Molkentin
995e8938ad SSLButton: Fix certificate display 2014-02-24 14:56:56 +01:00
Daniel Molkentin
5c1d612761 Account settings: Set correct state icon right away 2014-02-21 21:02:35 +01:00
Olivier Goffart
cd13144415 Fix adding a file in a Shared readonly directory
It should not create a conflict in that case.

Also when editing a file, create a conflict using the normal way,
after downloading the file and checking it is not the same
2014-02-21 10:53:09 +01:00
Daniel Molkentin
8e7290b450 Fix online state handling
Before this commit, parts of mirall were aware of the state, but not all.
Also, the state was not set back to Connected again in all cases. This
commit introduces the following changes:

- Make QuotaInfo a member of Account
- QuotaInfo and Folder (EtagJob) can put the client in disconnected mode
- FolderMan now disables etag-polling when offline

Fixes #1459
Fixes #1441
2014-02-20 23:24:03 +01:00
Daniel Molkentin
30d0e2fee8 Remove stray debug 2014-02-20 23:23:46 +01:00
dragotin
c38c3ce6e2 Merge pull request #1450 from owncloud/remove-file-string
remove 'File' word from notification
2014-02-20 17:31:57 +01:00