Commit graph

1929 commits

Author SHA1 Message Date
Olivier Goffart
81d786733d Merge remote-tracking branch 'origin/1.6' into il
Conflicts:
	VERSION.cmake
	src/mirall/propagator_qnam.cpp
	src/mirall/propagator_qnam.h
2014-07-18 16:59:29 +02:00
Olivier Goffart
beb9300b4e network limit: Never wait more than 10 seconds
When using the "Limit automatically" limit, we wait for 25% of the time
it took to upload something.
However, if we go to sleep while uploading, the time it took to upload may take
days. And waiting for 25% of a day is too long.
So never wait for more than 10 seconds

This may be related to issue #1880
2014-07-18 12:27:02 +02:00
Olivier Goffart
c35880d4f1 Fix corruption while trying to resume and the server don't suport it
Issue #1982
2014-07-18 12:03:45 +02:00
Klaas Freitag
71338000a4 SetupWizard: Keep initial local folder to compare later for changes.
If the local folder changes, the sync has to be reinitialized as
well. Until now we did not detect that, which led to the case that
the sync folder was not reinitialized in case only the local folder
changed in the setup dialog.
2014-07-16 11:37:46 +02:00
Olivier Goffart
8961e61f60 Merge branch '1.6' into il
Conflicts:
	VERSION.cmake
	src/mirall/syncengine.cpp
	src/mirall/syncengine.h
2014-07-16 09:57:40 +02:00
Olivier Goffart
d697969f36 Use another way to detect that the server was reconfigured
Before, we would only detect it if all the files were removed, and no
file where added or changed. This may not be enough because there might
be a welcome.txt file. Now, we check that none of the file stays the same,
and some files are removed.

Relates issue #1948
2014-07-15 18:09:08 +02:00
Olivier Goffart
51e9c5fd96 propagator_qnam Fix signal slot connection
Fix the signature so it can be connected

This was hapenning if the derver does not support X-OC-MTime

issue #1963
2014-07-15 18:08:26 +02:00
Markus Goetz
0202351a27 Propagator: Fix crash when logging out during upload
Fixes #1957
2014-07-14 19:53:42 +02:00
Olivier Goffart
3477ea0eeb Fix build with TOKEN_ONLY_AUTH
It was broken by commit 6ff38d8005
2014-07-10 15:26:55 +02:00
Olivier Goffart
63cd5ef563 ProtocolWidget: limit the number of items
That should save memory instead of letting the number of items grow
to infinity
2014-07-09 15:48:03 +02:00
Olivier Goffart
82c254fecf propagator_qnam: Avoid using too much memory
The idea here was that the buffer would be maximum 8KiB, not minimum.
2014-07-08 15:30:53 +02:00
Olivier Goffart
2f284209d8 Permissions: When moving is not allowed, fallback to delete and upload
We decided that we never want to rename a directory behind the
back of the user as the user may be using files in the directory
during the sync.
If moving is not allowed, we just erase the inode form the database so
the next sync will try to do an upload and delete and recover from there
using normal resolution.

This also add some code to update the inode back to the db when it is detected
as changed.
2014-06-27 15:30:08 +02:00
Olivier Goffart
09881040a3 Permissions: fix restoring subdirectories
The sync item vector must be sorted before we call checkForPermission
2014-06-27 13:34:15 +02:00
Olivier Goffart
92f07cb60f Enable C++11
In order to avoid the warning
 warning: anonymous variadic macros were introduced in C99
Due to the use of variadic macro in the qDebug macro in Qt 5.3

C++11 requires a space between string literal and macro to avoid the
ambiguity with user defined litteral
2014-06-25 12:01:27 +02:00
Olivier Goffart
fbadadc377 propagator: Fix folder duplication if the folder is renamed on the server while uploading
While uploading a new folder, if the folder is renamed on the server
when still uploading, the result will be that the files that are already
uploaded will end up in the new filder name, but the file that were
not still are in the old folder.

After renaming, all the new uploads wil fail with an error on this sync
because the parent directory don't exist.
But they were uploaded with the old name in the next sync because
the renaming was not detected because the file id was not in the DB

Fix the problem by fetching the file id always when creating a new
directory, on the next sync, and saving it in the database ummediatly

https://github.com/owncloud/enterprise/issues/191
2014-06-24 12:00:13 +02:00
Olivier Goffart
b735dc07d6 Permissions: Consider and empty remotePerms from csync as NULL
Since remotePerm from csync is never NULL (as it is a buffer),
we consider that if it is empty, there was no permission set
(and therefore everything is allowed)

csync will put a space in the permission if any permission was set
2014-06-23 15:05:48 +02:00
Olivier Goffart
68c902e60b propagator: Fix restoring directory
If the result of a restored directory is SoftError, this prevent
to sync the rest of the directory

Therefore, we introduced a new status Restored,  which means that
the job was a success, but is a restoration and therefore should be
seen as a warning
2014-06-23 13:56:17 +02:00
Olivier Goffart
e19214c3c4 permissions: record them even if the instruction is NONE
when the instruction is NONE, we may return from this function
before having registered the permission in the SyncEngine::_remotePerms
hash.
Move the code a bit up.
2014-06-23 13:35:34 +02:00
Olivier Goffart
02704cdf74 Merge remote-tracking branch 'origin/1.6' into il
Conflicts:
	VERSION.cmake
	csync/src/csync_statedb.c
	src/mirall/syncengine.cpp
	src/mirall/syncfileitem.h
2014-06-23 12:48:34 +02:00
Daniel Molkentin
7a8a3855b8 Mac: Make <ESC> close the settings dialog again 2014-06-20 16:37:07 +02:00
Daniel Molkentin
603a238eb9 Disable minimize button for Preferences on Mac 2014-06-20 16:31:17 +02:00
Daniel Molkentin
f3de6f46db Folder: Removed unused member _pathWatcher
This fixes Coverity CID 12914
2014-06-20 13:42:26 +02:00
Daniel Molkentin
1309dc27d9 Remove previously unused member
This fixes Coverity CID 12915
2014-06-20 13:40:55 +02:00
Daniel Molkentin
31469d6a3e Folderwizard: Properly initialize all members
This fixes coverity CID 12916
2014-06-20 13:38:36 +02:00
Daniel Molkentin
88776770f7 Legacy Propagator: Properly initialize members
This fixes coverity CID 12919
2014-06-20 13:36:15 +02:00
Daniel Molkentin
bbf8b9f8dd syncengine: properly initialize all members in ctor
This fixes Coverity CID 12922
2014-06-20 13:28:52 +02:00
Daniel Molkentin
6ff38d8005 Cleanup member initialization in Theme
This fixes coverity issue 12925
2014-06-20 13:28:52 +02:00
Klaas Freitag
d995d1190f SyncFileItem: Some more proper member initializations.
This fixes a Coverity CID
2014-06-20 12:54:46 +02:00
Klaas Freitag
3217e42a0f SyncJournalDB: Initialize size member properly with 0
This fixes Coverity CID 12924
2014-06-20 12:37:49 +02:00
Olivier Goffart
61ad376bf4 accountsettings: silent coverity warning 12884
We use f anyway, so if we are going to test if it's null we can as
well return
2014-06-20 11:51:07 +02:00
Olivier Goffart
1e788d3d60 folderwizard: fix possible use of null pointer
Coverity issue 12907
2014-06-20 11:29:28 +02:00
Olivier Goffart
83171bf025 accountsettings: remove unused function
It was moved into owncloudgui before
And it was broken (bad use of QUrl and use of null pointer
2014-06-20 11:27:37 +02:00
Olivier Goffart
2e51721851 owncloudgui: Fix compilation 2014-06-20 11:26:41 +02:00
Olivier Goffart
4d4a0148e4 owncloudgui: use QUrl::fromLocalFile 2014-06-20 11:21:36 +02:00
Daniel Molkentin
6b041b0846 Fix use-after-free in QNAM propagator
This fixes Coverity CID 12929
2014-06-20 10:58:03 +02:00
Olivier Goffart
02355696ff engine: When restoring the file, use the mtime and fileid from the server
Important to switch the things around as we are going to write them in the DB
2014-06-18 16:15:14 +02:00
Olivier Goffart
646eafb05d Legacy propagator jobs: Do not limit bandwidth when aborting
When aborting, we want the last job to be as fast as possible
as it blocks the UI.  So don't limit the bandwidth in that case
2014-06-18 15:09:19 +02:00
Olivier Goffart
0880444e37 Syncengine: Wait for the neon thead to be finished before destroying the Propagator and calling csync_commit
The legacy job might still need the neon session and the propagator.
We need to make sure the thread exits before.

This fixes crash when pausing a sync made with the legacy jobs
(for example when there is network limitation)
This should fix https://github.com/owncloud/enterprise/issues/200
2014-06-18 15:08:23 +02:00
Klaas Freitag
b71881d300 SyncEngine: Use QSet for the seenFiles rather than QHash.
We can save some memory here as the seenFiles list can be long.
2014-06-17 16:30:11 +02:00
Olivier Goffart
c759e8bb8f permission: read them from the tree 2014-06-17 14:50:24 +02:00
Olivier Goffart
b83f6c0b3a sync engine: try to respect permission
This is still Work in progress
2014-06-17 14:44:58 +02:00
Olivier Goffart
2f361278d2 Merge remote-tracking branch 'origin/1.6' into 'il' 2014-06-16 16:41:48 +02:00
Klaas Freitag
2d234cd96f Propagator: Handle file open error properly and log error message. 2014-06-16 13:35:50 +02:00
Klaas Freitag
1230e87330 Propagator: Give a more specific error message on file remove.
If the file is removed during it is synced up, there is now a correct
error message saying that, rather than "the file has changed during
upload."
2014-06-16 13:34:59 +02:00
Olivier Goffart
2caa69e0cb blacklist: use the _ERROR instruction instead of _IGNORE
When something is in the blacklist, still use the _ERROR instruction
that way the applications can still report errors for blacklisted
items
2014-06-13 11:19:31 +02:00
Klaas Freitag
c72c72a106 FolderWizard: Get folder map from FolderMan rather than store locally.
If the Folder::Map object is kept locally in the wizard, changes to
the map are not reflected there, as they happen when signing out.
This fixes bug #1875
2014-06-12 23:17:13 +02:00
Klaas Freitag
ed26bcb3e7 Theme: Show the stringified app version rather than the major version.
This was a regression, we changed that by accident in 1.6.0.

(cherry picked from commit 760ecd71fc)
2014-06-10 17:05:15 +02:00
Olivier Goffart
18e9357aaf network limits: Fix warning
About the order of initialization
2014-06-07 12:20:54 +02:00
Olivier Goffart
46b8260693 network limits: Do not read them from the config file in the engine
Do that from the folder, because the engine can be used in app where
the MirallConfigFile is not accessible
2014-06-07 12:09:22 +02:00
Markus Goetz
8dbfcd782b CSync: Fetch permissions from server for whole tree on server update 2014-06-06 17:10:07 +02:00