Comparar commits

...

137 Commits

Autor SHA1 Mensagem Data
Christian Kamm c895848560 Share dialog: Add 'Mail link' button #3261 2016-06-10 13:00:31 +02:00
Christian Kamm 87b4693a9d Add error message for trailing spaces on Windows #4878 2016-06-09 12:41:02 +02:00
ckamm 28c12a3ca0 Move touched-files tracking to SyncEngine #4927 (#4946) 2016-06-09 12:07:18 +02:00
Christian Kamm 66f041f74c Fix Qt4 build 2016-06-07 10:05:57 +02:00
Christian Kamm 6d02d76cfd Fix compile warnings in tests 2016-06-07 09:43:04 +02:00
Christian Kamm 48efbcb8ca Merge remote-tracking branch 'origin/2.2' 2016-06-07 09:39:44 +02:00
Jenkins for ownCloud ab050f9093 [tx-robot] updated from transifex 2016-06-07 02:19:44 -04:00
Jenkins for ownCloud bf9cffe4b3 [tx-robot] updated from transifex 2016-06-06 02:19:25 -04:00
Carla Schroder 43f727cf69 fix win install instructions: build path and docker image name (#4901) 2016-06-05 10:56:56 +02:00
Jenkins for ownCloud 256331fbaa [tx-robot] updated from transifex 2016-06-05 02:18:37 -04:00
Jenkins for ownCloud 32e6585ae6 [tx-robot] updated from transifex 2016-06-04 02:19:18 -04:00
Olivier Goffart d072e4a678 Fix compilation on windows 2016-06-03 13:28:53 +02:00
Olivier Goffart b99c8fe28b Folder: fix removing folder with escaped characters (#4943)
FolderDefinition::save and load escapes the alias. We also need to escape
it when we remove it.
New folder can't be created with alias that needs escaping, but old folder
from old config may still exist, and we must allow user to delete them.
2016-06-03 13:10:01 +02:00
Olivier Goffart 5a3120bd52 Folder: Ignore change from the watcher if the file has not changed its mtime or size (#4942)
For issue #4927:
On Windows 10, we get a notification after the sync is finished for file that were
just downloaded. The guard we have against our "own changes" are only working when
the sync is running and the OwncloudPropagator still alive.
2016-06-03 13:06:11 +02:00
Jenkins for ownCloud 9ea69be6ab [tx-robot] updated from transifex 2016-06-03 02:19:51 -04:00
Jenkins for ownCloud 86680a53e0 [tx-robot] updated from transifex 2016-06-03 01:15:59 -04:00
Daniel Molkentin 801cb42d57 Merge pull request #4939 from owncloud/osx_filewatcher_fix
OS X filewatcher fix
2016-06-02 18:37:38 +02:00
Markus Goetz 51f8a59a9a OS X: White-list the folder watcher enums
I got syncs triggered for even opening a file by double clicking it in Finder
and having launched Preview.app (e.g. for JPEG files).
2016-06-02 18:20:07 +02:00
Daniel Molkentin ebbe5acf2b Merge pull request #4938 from owncloud/fix_4840
GUI: don't force the environment variable for high DPI on linux.
2016-06-02 18:13:25 +02:00
Olivier Goffart 6ccd9e872d GUI: don't force the environment variable for high DPI on linux.
Setting the Environment variable only for owncloud makes in inconsistant with
other Qt application running at the same time.

The users can still set it themself for the whole desktop if they wish.

Addresses #4840
2016-06-02 17:57:10 +02:00
Daniel Molkentin da69756bb0 Merge pull request #4935 from owncloud/fix_updater_memleak
Fix memleak in updater
2016-06-02 15:36:49 +02:00
Daniel Molkentin 1787da8a9d Fix memleak in updater 2016-06-02 15:03:52 +02:00
Giovanni Capuano f0f82d02ff Fix link to the binary packages in README.md 2016-06-02 14:55:48 +02:00
Jenkins for ownCloud ff20cd4d57 [tx-robot] updated from transifex 2016-06-02 02:19:35 -04:00
Jenkins for ownCloud 9ab812f89b [tx-robot] updated from transifex 2016-06-01 02:19:17 -04:00
Jenkins for ownCloud e031f7d090 [tx-robot] updated from transifex 2016-06-01 01:18:50 -04:00
Markus Goetz de82d8fcdb QNAM: Try to workaround missing Qt patches #4720 #3888 #4051
We try this on all platforms now so we have more consistent behaviour.
2016-05-31 10:26:52 +02:00
Stephen Colebrook af2b712dc6 Search results are filtered by server. Don't filter a second time.
Also allows searching on attributes other than displayname in ldap
configurations. Search results match web and mobile apps.
2016-05-31 09:46:52 +02:00
Stephen Colebrook d4b72132d6 Search results are filtered by server. Don't filter a second time. Also allows searching on attributes other than displayname in ldap configurations. Search results match web and mobile apps. (#4902) 2016-05-31 09:45:38 +02:00
Markus Goetz a507558dee Connectivity: Reduce ETag job timeout to 60 sec #4275
Before it used the default job timeout
2016-05-31 09:35:47 +02:00
Jenkins for ownCloud e73c3199c0 [tx-robot] updated from transifex 2016-05-31 02:20:28 -04:00
Markus Goetz d88ab4653b Connectivity: Delete job on timeout #4275
This was not done if there was no reply
2016-05-30 18:15:41 +02:00
Klaas Freitag 9a2450c4c1 Update changelog for 2.2.1 2016-05-30 17:19:40 +02:00
Daniel Molkentin 3c1f5e662f Remove stray file 2016-05-30 12:05:22 +02:00
Daniel Molkentin 100ee69ddd Merge pull request #4923 from RobinGeuze/2.2
Fix Qt4 build
2016-05-30 11:50:50 +02:00
Robin Geuze d45d6ca9da Fix Qt4 build 2016-05-30 09:55:45 +02:00
Daniel Molkentin 2608c7007e Merge pull request #4922 from owncloud/fix_4840
Don't try to determine pixel ratio with Qt < 5.6.0
2016-05-30 09:20:50 +02:00
Jenkins for ownCloud 06a88ea9a4 [tx-robot] updated from transifex 2016-05-30 02:41:51 -04:00
Daniel Molkentin 0194ebb222 Don't try to determine pixel ratio with Qt < 5.6.0
This seems to be broken. Worst case users can still
set it manually

Addresses #4840
2016-05-30 08:27:57 +02:00
Jenkins for ownCloud dc654ac846 [tx-robot] updated from transifex 2016-05-29 02:18:52 -04:00
Jenkins for ownCloud 370fd5062c [tx-robot] updated from transifex 2016-05-28 02:19:09 -04:00
Daniel Molkentin 763016bd8f Merge pull request #4916 from mwleeds/patch-1
Fix typo in folder.cpp
2016-05-27 18:13:05 +02:00
Daniel Molkentin 00d20b4a42 Merge pull request #4913 from owncloud/normalize_name_in_filestatus
Undo regression caused by 727e73d
2016-05-27 18:08:08 +02:00
Matthew Leeds 7f0cc5b699 Fix typo in folder.cpp 2016-05-27 11:13:18 -04:00
Daniel Molkentin a2b238e2e5 Undo regression caused by 727e73d
normalization to NFC is still required. Mac OS API will not take
care of that by default.

Resolves #4884
2016-05-27 16:03:59 +02:00
ckamm 0e2c16e827 Certs: Re-ask for different cert after rejection #4898 (#4911)
Previously rejecting any kind of certificate meant that the user
was never asked again, even if the certificate changed.

Now we keep track of which certificates were rejected and ask again
if the ones mentioned in the ssl errors change.

mitmproxy is excellent for testing this.
2016-05-27 12:08:42 +02:00
ckamm b9fdae6d67 Progress: Don't count items without propagation jobs #4856 (#4910)
* Progress: Don't count dirs without propagation jobs #4856

These directory SyncFileItems are necessary for bookkeeping
but should not influence the progress display at all.

* Progress: Skip ignored files #4856
2016-05-27 10:52:00 +02:00
Jenkins for ownCloud c34115610e [tx-robot] updated from transifex 2016-05-27 02:19:21 -04:00
Jenkins for ownCloud d3a93cbaeb [tx-robot] updated from transifex 2016-05-27 01:15:50 -04:00
Olivier Goffart 275ad1e157 Utility: Better fix for the translation of minutes, seconds, ...
The plural was not translated because of QTBUG-3945. Work around it.
Issue #4855
2016-05-26 12:17:16 +02:00
Daniel Molkentin 85d3c7a263 Merge remote-tracking branch 'origin/2.2' 2016-05-26 10:19:50 +02:00
Jenkins for ownCloud 1855950fa1 [tx-robot] updated from transifex 2016-05-26 02:33:30 -04:00
Olivier Goffart 159535fe90 Merge branch '2.2' 2016-05-25 16:30:17 +02:00
Olivier Goffart fff5c280b3 SyncEngine: cleanup setting isDirectory 2016-05-25 16:27:40 +02:00
Olivier Goffart e960b265a8 Merge remote-tracking branch '2.1' into 2.2 2016-05-25 16:23:58 +02:00
Olivier Goffart f6b35e5d58 SyncEngine: invalid the blacklist entry when the rename destination change
The problem in this case is if we rename the file "xxx" to "invalid\file".
The rename will fail because the new filename constains a slash, and it
will be blacklisted.
But then if the user re-rename the file to "valid_name", then we should
invalidate the blacklist entry and retry to upload. But we did not do
that because renaming don't change the mtime and we did not store the
rename target in the database

IL issue 558
2016-05-25 15:32:45 +02:00
Markus Goetz 088a294fac Update issue_template.md
Use 2.2 link
2016-05-25 11:33:10 +02:00
Jenkins for ownCloud 1d93af5f64 [tx-robot] updated from transifex 2016-05-25 02:19:18 -04:00
Markus Goetz 75efa8b252 sqlite: Update bundled version to 3.13.0
For OS X and Windows.
2016-05-24 17:27:31 +02:00
Markus Goetz 009a0b03da Add ChangeLog for 2.2.1 2016-05-24 17:04:04 +02:00
Jenkins for ownCloud 8379a36a75 [tx-robot] updated from transifex 2016-05-24 07:40:14 -04:00
Daniel Molkentin 2f1a40ff7c Travis coverity: Enforce Ubuntu 14.04 env, fix repo 2016-05-24 11:30:03 +02:00
Daniel Molkentin c041ca6163 Fix pot. mem leak found by coverity (CID 96004) 2016-05-24 11:21:33 +02:00
Daniel Molkentin eacc0c8bd6 Fix pot. mem leak found by coverity (CID 12900) 2016-05-24 11:21:33 +02:00
Jenkins for ownCloud 171de99e00 [tx-robot] updated from transifex 2016-05-24 02:19:53 -04:00
ckamm bf02ccc1e8 Remember to upload files that are locked during a sync run (#4865)
See owncloud/enterprise#1342
2016-05-23 09:03:03 +02:00
Jenkins for ownCloud 7ba961c21a [tx-robot] updated from transifex 2016-05-23 02:19:05 -04:00
Jenkins for ownCloud cb7be78352 [tx-robot] updated from transifex 2016-05-22 02:19:13 -04:00
Jenkins for ownCloud 813bc15a78 [tx-robot] updated from transifex 2016-05-22 01:15:47 -04:00
Jenkins for ownCloud 6cb194e0d5 [tx-robot] updated from transifex 2016-05-21 02:19:09 -04:00
Markus Goetz 552ba94c41 SyncEngine: Set isDirectory before syncItemDiscovered
(cherry picked from commit fc1933803e)
2016-05-20 17:00:22 +02:00
Markus Goetz fc1933803e SyncEngine: Set isDirectory before syncItemDiscovered 2016-05-20 16:58:44 +02:00
Markus Goetz 46e4ec3183 Checksums: Use SHA1 like in >=2.2 2016-05-20 16:31:47 +02:00
Olivier Goffart 03e3b3bf50 Upload: put the job in the active list while doing the checksum computation.
This fixes an issue in which too many jobs are started un parallel
while uploading many files, which could cause too much memory usage as the
chunks are stored in memory.

Probably the fix for #4611
2016-05-20 16:28:27 +02:00
Christian Kamm 9aed8dbce8 Checksums: Compute content checksum on download #4375
Cherry-picked from d6d35029
2016-05-20 16:06:30 +02:00
ckamm c6794cd338 Progress info: Reset between syncs #4856 (PR #4872) 2016-05-20 15:07:54 +02:00
Jenkins for ownCloud 65ec1b74d5 [tx-robot] updated from transifex 2016-05-20 02:19:16 -04:00
ckamm 567fe87e98 Use natural sorting for filenames if available #4859 (#4864) 2016-05-19 15:36:46 +02:00
Christian Kamm a1ba23eea9 Activity: When a new notification arrives, switch to that tab #4805 2016-05-19 14:13:07 +02:00
Jenkins for ownCloud 1a3c9a9c1a [tx-robot] updated from transifex 2016-05-19 02:19:20 -04:00
Markus Goetz a038c99232 Upload: Remove bandwidth quota debug message #4837 2016-05-18 16:18:13 +02:00
Olivier Goffart 30c8fa1c93 Utility: Fix translation of second, minute, hour
Issue #4855

A typo in the context string made the translation lookup fail.
But also the %Ln was not recognized as a plural form by transifex, so only
the singular was translated
2016-05-18 10:52:22 +02:00
Olivier Goffart 010649f997 FolderWizard: remove dead code and fix the alias
Remove a bunch of dead code.

And also set the root folder name properly since alias is gone.

Fix the warning:
QWizard::field: No such field 'alias'
2016-05-18 10:52:22 +02:00
Jenkins for ownCloud 597f2a4dfc [tx-robot] updated from transifex 2016-05-18 02:19:16 -04:00
Olivier Goffart cf1fe690a3 Shibboleth: Show the inspector if OWNCLOUD_SHIBBOLETH_DEBUG is set
Help to debug https://github.com/owncloud/enterprise/issues/1265
2016-05-17 12:29:20 +02:00
Olivier Goffart 194db066b6 Merge remote-tracking branch 'origin/2.2' 2016-05-17 10:04:31 +02:00
Jenkins for ownCloud 31b27bea38 [tx-robot] updated from transifex 2016-05-17 02:18:59 -04:00
Jenkins for ownCloud 04f99f3bd7 [tx-robot] updated from transifex 2016-05-15 02:19:07 -04:00
Jenkins for ownCloud fbf92ac239 [tx-robot] updated from transifex 2016-05-14 02:19:15 -04:00
hefee 669a72f0e1 A final release version number breaks this regex (#4835)
f.ex. a valid verson nr: 2.2.0
-> fist \d+ = 2
-> second \d+ = 2
-> the last \d+ = 0
-> .+ in not matching, because there is nothing to match
2016-05-13 16:55:11 +02:00
Jenkins for ownCloud 2f0e65d37c [tx-robot] updated from transifex 2016-05-13 02:25:05 -04:00
Olivier Goffart 5676685f58 SyncEngine: Add a compile option so we rename to restoring a move we don't have the permission to do
IL issue 550
2016-05-12 13:15:30 +02:00
Christian Kamm db9ccb40a4 Fix compile with strict C flags 2016-05-12 13:14:40 +02:00
Christian Kamm d4c15d2c38 Ignores: expand escapes #4568
(cherry picked from commit d7bd1300a8)
2016-05-12 11:53:17 +02:00
Hefee edb3759684 For tests we do not need a xserver running.
Use for tests QTEST_GUILESS_MAIN and QTEST_APPLESS_MAIN.
2016-05-12 11:34:21 +02:00
Christian Kamm 0f9c32452c Protocol: Increase width of timestamp column #4721
Since the font metrics aren't reliable on windows, we add some
extra space there.
2016-05-12 10:24:34 +02:00
Daniel Molkentin 45dd1d0acf Bump to 2.2.1 2016-05-12 09:58:12 +02:00
Daniel Molkentin 552af7b94d 2.2.0 final 2016-05-12 09:58:12 +02:00
Christian Kamm 8934979ba1 timeAgo test: Fix for qt4, clean up 2016-05-12 09:25:15 +02:00
Daniel Molkentin b3e16e0eb0 Merge pull request #4825 from owncloud/22-user-manual
[Doc] 2.2 user manual updates
2016-05-12 08:20:55 +02:00
Carla Schroder 7773380deb update file manager screenshot 2016-05-11 12:44:27 -07:00
Carla Schroder e22050a434 updates to 2.2 user manual 2016-05-11 12:37:40 -07:00
Daniel Molkentin 7b0231bfce Merge pull request #4821 from owncloud/notification_doc
Documentation draft to introduce notifications.
2016-05-11 21:16:35 +02:00
Jocelyn Turcotte edc58c045f Fix assert on restore after propagation (#4823)
The assert was there to make sure that this case wasn't happening
to eventually be properly tested. Remove the assert for now but this
codepath should eventually be unit tested using this specific situation.
2016-05-11 18:16:46 +02:00
Klaas Freitag 035058934f Documentation draft to introduce notifications.
Also added a screenshot.
2016-05-11 11:16:08 +02:00
Klaas Freitag 9b1f46e560 Fix exclude unit test, adopt to new Iface of isExcluded. 2016-05-10 16:46:08 +02:00
Klaas Freitag 9e7a8e619b Fix utility test: Pass a command name to do the version check. 2016-05-10 16:26:42 +02:00
Klaas Freitag 9c0cd2b13e Added Changelog for 2.2.0 2016-05-10 15:39:44 +02:00
Daniel Molkentin 58ad781bd4 Update binary submodule 2016-05-10 14:39:22 +02:00
Daniel Molkentin 9d6701ecbe Windows Shell Integration: Fix another spot where the pipe path was constructed manually 2016-05-10 13:49:14 +02:00
Daniel Molkentin d659c54798 Update binary sub module 2016-05-10 10:36:49 +02:00
Daniel Molkentin 0e9170cb36 Windows Shell Integration: Unify path lookups 2016-05-10 10:18:53 +02:00
Markus Goetz 8820bc1c17 Windows: Fix Share menu #4781 2016-05-09 14:37:46 +02:00
Jenkins for ownCloud 74f67c97a9 [tx-robot] updated from transifex 2016-05-09 02:19:15 -04:00
Jenkins for ownCloud fd96b482c5 [tx-robot] updated from transifex 2016-05-07 02:19:16 -04:00
Jocelyn Turcotte 727e73d640 [shell/windows] Fix the windows status push not working (#4784)
Since the windows implementation first does cache lookups using the
path string, directories need to be passed identically as through
RETRIEVE_FILE_STATUS.

Change the convention to never have a trailing slash for directories
in the protocol. This allows the convention to be applied without
having to access the disk (since we'd need to know if the path is
represented by a directory) and also matches the convention of the
rest of the sync engine. Individual file manager plugins are then
responsible of handling pushed paths as not ending with a trailing
slash.

This also:
- Moves the trailing slash removal logic from the SyncFileStatusTracker
  to the SocketApi class
- Remove the unneeded QString::normalized call in fileStatus, since
  this should already be done by the FolderWatcher and plugins
2016-05-06 12:32:01 +02:00
Jenkins for ownCloud d7804d8df3 [tx-robot] updated from transifex 2016-05-06 02:19:00 -04:00
Olivier Goffart 3d9d106bb1 Dolphin plugin: fix build with branding
Make sure that the name of the _export.h file is the same no matter the plugin
2016-05-04 14:19:18 +02:00
Jenkins for ownCloud 15dc3408ef [tx-robot] updated from transifex 2016-05-04 02:19:15 -04:00
Markus Goetz 928643f597 NSIS: Properly uninstall both x64 and x86 DLLs #4762
Viel hilft viel ;-)
2016-05-03 18:35:01 +02:00
Markus Goetz 7110091fdd Qt patches: Update with information about Qt 5.6 2016-05-03 15:16:07 +02:00
Jocelyn Turcotte 064c2b678a Merge branch 'overlayIconFixes' into 2.2 (#4765) 2016-05-03 13:04:34 +02:00
Jocelyn Turcotte e58739de00 [osx] Fix missing overlay icons on client startup
Since the statuses are cached and that we can't invalidate the cache,
sending NOP would need to be overwritten by the default OK status
once the client successfully connected. But instead of remembering
which files we NOPed, rather wait until we are ready to sync before
sending the REGISTER_PATH message to the socket API client. It will
also prevent the client from sending unnecessary RETRIEVE_FILE_STATUS
requests.

Also remove AccountState::canSync, since it does the same as
isConnected and syncing is not an account responsibility.
2016-05-03 13:01:51 +02:00
Jocelyn Turcotte 7c2fdee78b Avoid a SyncFileStatusTracker private overload with the same name
Having an overload as a private function in the same class makes the
code harder to follow. Rename the private fileStatus to syncFileItemStatus.
2016-05-03 13:01:51 +02:00
Jocelyn Turcotte 7bfe46962f Simplify the root status logic
Go through fileStatus like other cases to make sure that all use
cases go through the same code path. This also makes sure to use
lookupProblem which will use lower_bound which is more efficient
for larger sets of sync problems.

This also fixes the issue with lookupProblem that prevented it to
properly match an empty pathToMatch, caused by the fact that the
problem map contains relative paths not starting with a slash.
2016-05-03 13:01:51 +02:00
Jocelyn Turcotte 32b3023a8e Fix the root item sync status #4682
Make sure that we push the new status when the status of the SyncEngine
changed. SyncEngine::started comes a bit late, only when the propagation
starts, although it's better in this case since child folders will
only switch to Sync in aboutToPropagate.

Also fix an issue with SyncEngine::findSyncItem when using an empty
fileName; this would match and return the wrong item, even though
not currently happening with the code since fileStatus won't call
it with an empty fileName anymore.
2016-05-03 13:01:51 +02:00
Jocelyn Turcotte a5df44c757 Fix the sync status push for parent directories #4682
As before, we rely on metadata-update SyncFileItem entries for parent
directories to notify us that a directory contains files to propagate,
and to know when all children were propagated through its itemCompleted
signal.

Those metadata SyncFileItems however have a None direction and we need
to add a explicit directory check to show them as Sync.
This fix also handles new files as well as existing ones, so no need
to keep a separate logic for new files.
2016-05-03 13:01:51 +02:00
Jocelyn Turcotte 129c17651a Revert "Overlay icon fixes (#4765)"
The pull request should have been done against the 2.2 branch, and
the branch would better be merged instead of squashed to keep the
history easier to lookup.

This reverts commit 0469236d80.
2016-05-03 12:59:17 +02:00
Klaas Freitag 641125eac1 Fix nautilus and nemo plugin branding strings. (#4780)
* Fix nautilus and nemo plugin branding strings.

Fix for owncloud/enterprise#1314

* nautilus plugin: Add a comment why the line needs to stay unchanged.
2016-05-03 11:36:56 +02:00
Jenkins for ownCloud d340017a0a [tx-robot] updated from transifex 2016-05-03 02:19:16 -04:00
Olivier Goffart a67173610d Propagator: fix qt4 build
propagatedownload.cpp:712:35: error: 'seenLockedFile' is a protected member of 'OCC::OwncloudPropagator'

Signals are protected in Qt4 but public in Qt5, mark the class accessing it
as friend when compiling with Qt4
2016-05-02 17:34:21 +02:00
Jocelyn Turcotte 0469236d80 Overlay icon fixes (#4765)
* Fix the sync status push for parent directories #4682

As before, we rely on metadata-update SyncFileItem entries for parent
directories to notify us that a directory contains files to propagate,
and to know when all children were propagated through its itemCompleted
signal.

Those metadata SyncFileItems however have a None direction and we need
to add a explicit directory check to show them as Sync.
This fix also handles new files as well as existing ones, so no need
to keep a separate logic for new files.

* Fix the root item sync status #4682

Make sure that we push the new status when the status of the SyncEngine
changed. SyncEngine::started comes a bit late, only when the propagation
starts, although it's better in this case since child folders will
only switch to Sync in aboutToPropagate.

Also fix an issue with SyncEngine::findSyncItem when using an empty
fileName; this would match and return the wrong item, even though
not currently happening with the code since fileStatus won't call
it with an empty fileName anymore.

* Simplify the root status logic

Go through fileStatus like other cases to make sure that all use
cases go through the same code path. This also makes sure to use
lookupProblem which will use lower_bound which is more efficient
for larger sets of sync problems.

This also fixes the issue with lookupProblem that prevented it to
properly match an empty pathToMatch, caused by the fact that the
problem map contains relative paths not starting with a slash.

* Avoid a SyncFileStatusTracker private overload with the same name

Having an overload as a private function in the same class makes the
code harder to follow. Rename the private fileStatus to syncFileItemStatus.

* [osx] Fix missing overlay icons on client startup

Since the statuses are cached and that we can't invalidate the cache,
sending NOP would need to be overwritten by the default OK status
once the client successfully connected. But instead of remembering
which files we NOPed, rather wait until we are ready to sync before
sending the REGISTER_PATH message to the socket API client. It will
also prevent the client from sending unnecessary RETRIEVE_FILE_STATUS
requests.

Also remove AccountState::canSync, since it does the same as
isConnected and syncing is not an account responsibility.
2016-05-02 16:33:17 +02:00
Olivier Goffart 93e0d52dd3 Merge pull request #4769 from orion1024/curl-check-in-perl-tests
Adding CURL check in t6.pl
2016-04-30 14:25:21 +02:00
orion1024 9f3e576348 Adding CURL check in t6.pl
Aborts immediately if CURL not found, to avoid misleading errors later.
2016-04-30 11:44:16 +02:00
Olivier Goffart 5479aaeb5b Merge remote-tracking branch 'origin/2.2' 2016-04-28 16:38:46 +02:00
Christian Kamm 8dc178a9f3 Share link: Consistent order of options owncloud/core#24122 2016-04-26 07:45:41 +02:00
Klaas Freitag 35d4b96339 Set base version to 2.3.0. For 2.2, please use the branch 2.2 2016-04-25 14:15:17 +02:00
135 arquivos alterados com 17832 adições e 8390 exclusões
+10 -4
Ver Arquivo
@@ -1,15 +1,21 @@
sudo: required
language: cpp
services:
- docker
branches:
only:
- coverity_scan
before_install:
- sudo sh -c "echo 'deb http://download.opensuse.org/repositories/isv:/ownCloud:/desktop/xUbuntu_12.04/ /' >> /etc/apt/sources.list.d/owncloud-client.list"
- sudo sh -c "echo 'deb-src http://download.opensuse.org/repositories/isv:/ownCloud:/desktop/xUbuntu_12.04/ /' >> /etc/apt/sources.list.d/owncloud-client.list"
- wget http://download.opensuse.org/repositories/isv:ownCloud:desktop/xUbuntu_12.04/Release.key
- sudo sh -c "echo 'deb http://download.opensuse.org/repositories/isv:/ownCloud:/desktop/Ubuntu_14.04/ /' >> /etc/apt/sources.list.d/owncloud-client.list"
- sudo sh -c "echo 'deb-src http://download.opensuse.org/repositories/isv:/ownCloud:/desktop/Ubuntu_14.04/ /' >> /etc/apt/sources.list.d/owncloud-client.list"
- wget http://download.opensuse.org/repositories/isv:ownCloud:desktop/Ubuntu_14.04/Release.key
- sudo apt-key add - < Release.key
- sudo apt-get update
- sudo apt-get build-dep owncloud-client
- sudo apt-get -y build-dep owncloud-client
- checkout=$(git show-ref --head --hash head)
- cd ../
- wget https://scan.coverity.com/download/linux-64 --post-data "token=$token&project=owncloud%2Fmirall" -O coverity_tool.tgz
+12
Ver Arquivo
@@ -1,3 +1,4 @@
cmake_minimum_required(VERSION 2.6)
cmake_policy(VERSION 2.8.0)
@@ -125,6 +126,17 @@ if(OWNCLOUD_5XX_NO_BLACKLIST)
add_definitions(-DOWNCLOUD_5XX_NO_BLACKLIST=1)
endif()
# When this option is enabled, a rename that is not allowed will be renamed back
# do the original as a restoration step. Withut this option, the restoration will
# re-download the file instead.
# The default is off because we don't want to rename the files back behind the user's back
# Added for IL issue #550
option(OWNCLOUD_RESTORE_RENAME "OWNCLOUD_RESTORE_RENAME" OFF)
if(OWNCLOUD_RESTORE_RENAME)
add_definitions(-DOWNCLOUD_RESTORE_RENAME=1)
endif()
if(APPLE)
set( SOCKETAPI_TEAM_IDENTIFIER_PREFIX "" CACHE STRING "SocketApi prefix (including a following dot) that must match the codesign key's TeamIdentifier/Organizational Unit" )
endif()
+33
Ver Arquivo
@@ -1,5 +1,38 @@
ChangeLog
=========
version 2.2.1 (release 2016-05-xx)
* Fix out of memory error when too many uploads happen (#4611)
* Fix display errors in progress display (#4803 #4856)
* LockWatcher: Remember to upload files after they become unlocked (#4865)
* Fix overlay icons for files with umlauts (#4884)
* Certs: Re-ask for different cert after rejection (#4898, #4911)
* Progress: Don't count items without propagation jobs (#4856, #4910)
* Utility: Fix for the translation of minutes, second (#4855)
* SyncEngine: invalid the blacklist entry when the rename destination change
version 2.2.0 (release 2016-05-12)
* Overlay icons: Refactoring - mainly for performance improvements
* Improved error handling with Sync Journal on USB storages (#4632)
* Sharing Completion: Improved UI of completion in sharing from desktop. (#3737)
* Show server notifications on the client (#3733)
* Improved Speed with small files by dynamic parallel request count (#4529)
* LockWatcher: Make sure to sync files after apps released exclusive locks on Windows.
* Improved handling of Win32 file locks and network files
* Workaround Ubuntu 16.04 tray icon bug (#4693)
* Removed the Alias field from the folder definition (#4695)
* Improved netrc parser (#4691)
* Improved user notifications about ignored files and conflicts (#4761, #3222)
* Add warnings for old server versions (#4523)
* Enable tranportation checksums if the server supports based on server capabilities (#3735)
* Default Chunk-size changed to 10MB (#4354)
* Documentation Improvements, ie. about overlay icons
* Translation fixes
* Countless other bugfixes
* Sqlite Update to recent version
* Update of QtKeyChain to support Windows credential store
* Packaging of dolphin overlay icon module for bleeding edge distros
version 2.1.1 (release 2016-02-10)
* UI improvements for HiDPI screens, error messages, RTL languages
* Fix occurences of "Connection Closed" when a new unauthenticated TCP socket is used
+1 -1
Ver Arquivo
@@ -15,7 +15,7 @@ with your computer.
### Binary packages
* Refer to the download page http://owncloud.org/sync-clients/
* Refer to the download page https://owncloud.org/install/#install-clients
### Source code
+1 -1
Ver Arquivo
@@ -1,5 +1,5 @@
set( MIRALL_VERSION_MAJOR 2 )
set( MIRALL_VERSION_MINOR 2 )
set( MIRALL_VERSION_MINOR 3 )
set( MIRALL_VERSION_PATCH 0 )
set( MIRALL_VERSION_YEAR 2016 )
set( MIRALL_SOVERSION 0 )
+13 -5
Ver Arquivo
@@ -1,7 +1,7 @@
## Patches used
There are our patches on top of Qt 5.4.0, which we are currently
using for our binary packages on Windows and Mac OS. Most of them
using for our binary packages on Windows and Mac OS X. Most of them
have been sent upstream and are part of newer Qt releases.
All changes are designed to up upstream, and all those that are
@@ -28,18 +28,26 @@ purpose is outlined in each patches' front matter.
* 0007-X-Network-Fix-up-previous-corruption-patch.patch
* 0008-QNAM-Fix-reply-deadlocks-on-server-closing-connectio.patch
* 0014-Fix-SNI-for-TlsV1_0OrLater-TlsV1_1OrLater-and-TlsV1_.patch
* 0016-Fix-possible-crash-when-passing-an-invalid-PAC-URL.patch
* 0011-Make-sure-to-report-correct-NetworkAccessibility.patch
### Upstreamed but not in any release yet (as of 2015-11-16)
### Part of Qt v5.5.2 (UNRELEASED!)
* 0009-QNAM-Assign-proper-channel-before-sslErrors-emission.patch
* 0010-Don-t-let-closed-http-sockets-pass-as-valid-connecti.patch
* 0012-Make-sure-networkAccessibilityChanged-is-emitted.patch
### Part of Qt v5.6 and later
* 0009-QNAM-Assign-proper-channel-before-sslErrors-emission.patch
* 0010-Don-t-let-closed-http-sockets-pass-as-valid-connecti.patch
* 0011-Make-sure-to-report-correct-NetworkAccessibility.patch
* 0012-Make-sure-networkAccessibilityChanged-is-emitted.patch
* 0013-Make-UnknownAccessibility-not-block-requests.patch
* 0015-Remove-legacy-platform-code-in-QSslSocket-for-OS-X-1.patch
* 0016-Fix-possible-crash-when-passing-an-invalid-PAC-URL.patch
* 0019-Ensure-system-tray-icon-is-prepared-even-when-menu-bar.patch
### Not submitted to be part of any release:
### Part of Qt 5.7 and later
* 0015-Remove-legacy-platform-code-in-QSslSocket-for-OS-X-1.patch
### Not submitted upstream to be part of any release:
* 0006-Fix-force-debug-info-with-macx-clang_NOUPSTREAM.patch
This is only needed if you intent to harvest debugging symbols
for breakpad.
+1 -1
Ver Arquivo
@@ -30,7 +30,7 @@ StrCpy $OPTION_SECTION_SC_QUICK_LAUNCH_Desc "Z
StrCpy $UNINSTALLER_FILE_Detail "Zapisuji odinstal tor"
StrCpy $UNINSTALLER_REGISTRY_Detail "Zapisuji instal tor do registr…"
StrCpy $UNINSTALLER_FINISHED_Detail "DokonŸeno"
StrCpy $UNINSTALL_MESSAGEBOX "Nezd  se, §e ${APPLICATION_NAME} je nainstalov na ve slo§ce '$INSTDIR'.$\n$\nChcete pokraŸovat (nedoporuŸuje se)?"
StrCpy $UNINSTALL_MESSAGEBOX "Nezd  se, §e ${APPLICATION_NAME} je nainstalov na v adres ýi '$INSTDIR'.$\n$\nChcete pokraŸovat (nedoporuŸuje se)?"
StrCpy $UNINSTALL_ABORT "Odinstalace zruçena u§ivatelem"
StrCpy $INIT_NO_QUICK_LAUNCH "Z stupce rychlho spuçtØn¡ (nen¡ k dispozici)"
StrCpy $INIT_NO_DESKTOP "Z stupce na ploçe (pýep¡çe existuj¡c¡)"
+6 -6
Ver Arquivo
@@ -1,14 +1,14 @@
# Auto-generated - do not modify
StrCpy $MUI_FINISHPAGE_SHOWREADME_TEXT_STRING "Mostrar notas de lançamento"
StrCpy $ConfirmEndProcess_MESSAGEBOX_TEXT "Existem ${APPLICATION_EXECUTABLE} processo(s) em execução que precisa(m) de ser interrompido(s).$\nDeseja que o instalador o(s) termine automaticamente?"
StrCpy $ConfirmEndProcess_KILLING_PROCESSES_TEXT "A terminar os processos ${APPLICATION_EXECUTABLE}."
StrCpy $ConfirmEndProcess_KILL_NOT_FOUND_TEXT "Não foi encontrado o processo a terminar!"
StrCpy $PageReinstall_NEW_Field_1 "Uma versão antiga de ${APPLICATION_NAME} está instalada no sistema. É recomendado que você desinstale a versão atual antes de instalar a mais recente. Selecione a operação que deseja executar e clique em $\"Avançar$\" para continuar."
StrCpy $ConfirmEndProcess_KILLING_PROCESSES_TEXT "A terminar os processos de ${APPLICATION_EXECUTABLE}."
StrCpy $ConfirmEndProcess_KILL_NOT_FOUND_TEXT "Não foi encontrado nenhum processo para terminar!"
StrCpy $PageReinstall_NEW_Field_1 "Está instalada no sistema uma versão antiga de ${APPLICATION_NAME}. É recomendado que desinstale a versão atual antes de instalar a mais recente. Selecione a operação que deseja executar e clique em $\"Seguinte$\" para continuar."
StrCpy $PageReinstall_NEW_Field_2 "Desinstalar antes de instalar"
StrCpy $PageReinstall_NEW_Field_3 "Não desinstale"
StrCpy $PageReinstall_NEW_MUI_HEADER_TEXT_TITLE "Já instalado"
StrCpy $PageReinstall_NEW_MUI_HEADER_TEXT_SUBTITLE "Escolha como pretende instalar ${APPLICATION_NAME}."
StrCpy $PageReinstall_OLD_Field_1 "Uma versão mais recente do ${APPLICATION_NAME} já está instalada! Não é recomendada a instalação de uma versão mais antiga. Se realmente deseja instalar esta versão, aconselha-se a desinstalação da versão atual primeiro. Selecione a operação que deseja executar e clique em Avançar para continuar."
StrCpy $PageReinstall_OLD_Field_1 "Uma versão mais recente da aplicação ${APPLICATION_NAME} já está instalada! Não é recomendada a instalação de uma versão mais antiga. Se realmente deseja instalar esta versão, aconselha-se a desinstalação da versão atual primeiro. Selecione a operação que deseja executar e clique em Avançar para continuar."
StrCpy $PageReinstall_SAME_Field_1 "${APPLICATION_NAME} ${VERSION} já está instalada.$\nSelecione a operação que deseja realizar e clique em 'Seguinte' para continuar."
StrCpy $PageReinstall_SAME_Field_2 "Adicionar/Reinstalar Componentes"
StrCpy $PageReinstall_SAME_Field_3 "Desinstalar ${APPLICATION_NAME}"
@@ -25,12 +25,12 @@ StrCpy $OPTION_SECTION_SC_QUICK_LAUNCH_SECTION "Atalho de início rápido"
StrCpy $OPTION_SECTION_SC_QUICK_LAUNCH_DetailPrint "A criar atalho de início rápido"
StrCpy $OPTION_SECTION_SC_APPLICATION_Desc "O essencial de ${APPLICATION_NAME}."
StrCpy $OPTION_SECTION_SC_START_MENU_Desc "Atalho de ${APPLICATION_NAME}."
StrCpy $OPTION_SECTION_SC_DESKTOP_Desc "Atalho no ambiente de trabalho de ${APPLICATION_NAME}."
StrCpy $OPTION_SECTION_SC_DESKTOP_Desc "Atalho do ambiente de trabalho para ${APPLICATION_NAME}."
StrCpy $OPTION_SECTION_SC_QUICK_LAUNCH_Desc "Atalho de início rápido de ${APPLICATION_NAME}."
StrCpy $UNINSTALLER_FILE_Detail "A escrever o Desinstalador"
StrCpy $UNINSTALLER_REGISTRY_Detail "A escrever chaves de registo do instalador"
StrCpy $UNINSTALLER_FINISHED_Detail "Terminado"
StrCpy $UNINSTALL_MESSAGEBOX "Não parece que ${APPLICATION_NAME} esteja instalado no diretório '$INSTDIR'.$\n$\nContinuar na mesma (não recomendado)?"
StrCpy $UNINSTALL_MESSAGEBOX "Não parece que a aplicação ${APPLICATION_NAME} esteja instalada no diretório '$INSTDIR'.$\n$\nContinuar na mesma (não recomendado)?"
StrCpy $UNINSTALL_ABORT "Desinstalação cancelada pelo utilizador"
StrCpy $INIT_NO_QUICK_LAUNCH "Atalho de Início Rápido (N/A)"
StrCpy $INIT_NO_DESKTOP "Atalho do Ambiente de Trabalho (sobrepõe o existente)"
+1 -1
Ver Arquivo
@@ -9,6 +9,7 @@ StrCpy $PageReinstall_NEW_Field_3 "Avinstallera inte"
StrCpy $PageReinstall_NEW_MUI_HEADER_TEXT_TITLE "Redan installerad"
StrCpy $PageReinstall_NEW_MUI_HEADER_TEXT_SUBTITLE "Välj hur du vill installera ${APPLICATION_NAME}."
StrCpy $PageReinstall_OLD_Field_1 "En nyare version av ${APPLICATION_NAME} är redan installerad! Det rekommenderas inte att du installerar en äldre version. Om du verkligen vill installera denna äldre versionen, är det bättre att du avinstallerar den nuvarande versionen först. Välj den åtgärd du vill utföra och klicka Nästa för att fortsätta."
StrCpy $PageReinstall_SAME_Field_1 "${APPLICATION_NAME} ${VERSION} är redan installerad.$\n$\nVälj den åtgärd du vill utföra och klicka på Nästa för att fortsätta."
StrCpy $PageReinstall_SAME_Field_2 "Lägg till/Ominstallera komponenter"
StrCpy $PageReinstall_SAME_Field_3 "Avinstallera ${APPLICATION_NAME}"
StrCpy $UNINSTALLER_APPDATA_TITLE "Avinstallera ${APPLICATION_NAME}"
@@ -40,4 +41,3 @@ StrCpy $UAC_UNINSTALLER_REQUIRE_ADMIN "Detta avinstallationsprogram kräver adm
StrCpy $UAC_ERROR_LOGON_SERVICE "Login-service körs inte, avbryter!"
StrCpy $INIT_UNINSTALLER_RUNNING "Avinstallationsprogrammet körs redan."
StrCpy $SectionGroup_Shortcuts "Genvägar"
StrCpy $PageReinstall_SAME_Field_1 "${APPLICATION_NAME} ${VERSION} is already installed.$\r$\nSelect the operation you want to perform and click Next to continue."
+1 -1
Submodule binary updated: a56480559d...d27d472817
-5
Ver Arquivo
@@ -1,5 +0,0 @@
--- binary
+++ binary
@@ -1 +1 @@
-Subproject commit 1fb9ddfa9a9a1b4dbc447eee10dbed89172d968a
+Subproject commit 01d73965dc8b862d1b2310d3ef801c297b697ec7
-1
Ver Arquivo
@@ -620,7 +620,6 @@ Section Uninstall
!insertmacro UnInstallLib REGDLL NOTSHARED REBOOT_PROTECTED "$INSTDIR\shellext\OCOverlays_x64.dll"
!insertmacro UnInstallLib DLL NOTSHARED REBOOT_PROTECTED "$INSTDIR\shellext\OCUtil_x64.dll"
!undef LIBRARY_X64
${Else}
DetailPrint "Uninstalling x86 overlay DLLs"
!insertmacro UnInstallLib REGDLL NOTSHARED REBOOT_PROTECTED "$INSTDIR\shellext\OCContextMenu_x86.dll"
!insertmacro UnInstallLib REGDLL NOTSHARED REBOOT_PROTECTED "$INSTDIR\shellext\OCOverlays_x86.dll"
+1
Ver Arquivo
@@ -98,6 +98,7 @@ enum csync_status_codes_e {
CSYNC_STATUS_INDIVIDUAL_IS_SYMLINK,
CSYNC_STATUS_INDIVIDUAL_IGNORE_LIST,
CSYNC_STATUS_INDIVIDUAL_IS_INVALID_CHARS,
CSYNC_STATUS_INDIVIDUAL_TRAILING_SPACE,
CSYNC_STATUS_INDIVIDUAL_EXCLUDE_LONG_FILENAME,
CYSNC_STATUS_FILE_LOCKED_OR_OPEN,
CSYNC_STATUS_INDIVIDUAL_EXCLUDE_HIDDEN,
+6 -2
Ver Arquivo
@@ -229,8 +229,12 @@ static CSYNC_EXCLUDE_TYPE _csync_excluded_common(c_strlist_t *excludes, const ch
// distinguish files ending in '.' from files without an ending,
// as '.' is a separator that is not stored internally, so let's
// not allow to sync those to avoid file loss/ambiguities (#416)
if (blen > 1 && (bname[blen-1]== ' ' || bname[blen-1]== '.' )) {
match = CSYNC_FILE_EXCLUDE_INVALID_CHAR;
if (blen > 1) {
if (bname[blen-1]== ' ') {
match = CSYNC_FILE_EXCLUDE_TRAILING_SPACE;
} else if (bname[blen-1]== '.' ) {
match = CSYNC_FILE_EXCLUDE_INVALID_CHAR;
}
goto out;
}
+1
Ver Arquivo
@@ -27,6 +27,7 @@ enum csync_exclude_type_e {
CSYNC_FILE_EXCLUDE_AND_REMOVE,
CSYNC_FILE_EXCLUDE_LIST,
CSYNC_FILE_EXCLUDE_INVALID_CHAR,
CSYNC_FILE_EXCLUDE_TRAILING_SPACE,
CSYNC_FILE_EXCLUDE_LONG_FILENAME,
CSYNC_FILE_EXCLUDE_HIDDEN,
CSYNC_FILE_EXCLUDE_STAT_FAILED
+3
Ver Arquivo
@@ -270,6 +270,7 @@ static int _csync_detect_update(CSYNC *ctx, const char *file,
if(_last_db_return_error(ctx)) {
SAFE_FREE(st);
SAFE_FREE(tmp);
ctx->status_code = CSYNC_STATUS_UNSUCCESSFUL;
return -1;
}
@@ -476,6 +477,8 @@ out:
st->error_status = CSYNC_STATUS_INDIVIDUAL_IGNORE_LIST; /* File listed on ignore list. */
} else if (excluded == CSYNC_FILE_EXCLUDE_INVALID_CHAR) {
st->error_status = CSYNC_STATUS_INDIVIDUAL_IS_INVALID_CHARS; /* File contains invalid characters. */
} else if (excluded == CSYNC_FILE_EXCLUDE_TRAILING_SPACE) {
st->error_status = CSYNC_STATUS_INDIVIDUAL_TRAILING_SPACE; /* File ends with a trailing space. */
} else if (excluded == CSYNC_FILE_EXCLUDE_LONG_FILENAME) {
st->error_status = CSYNC_STATUS_INDIVIDUAL_EXCLUDE_LONG_FILENAME; /* File name is too long. */
} else if (excluded == CSYNC_FILE_EXCLUDE_HIDDEN ) {
@@ -30,7 +30,6 @@
static void setup(void **state) {
CSYNC *csync;
int rc;
csync_create(&csync, "/tmp/check_csync1", "/tmp/check_csync2");
-1
Ver Arquivo
@@ -74,7 +74,6 @@ static void teardown(void **state) {
static void check_csync_init(void **state)
{
CSYNC *csync = *state;
int rc;
csync_init(csync);
+7
Ver Arquivo
@@ -31,6 +31,13 @@ use strict;
print "Hello, this is t6, a tester for csync with ownCloud.\n";
# Checking CURL is installed to avoid misleading errors later...
system(("curl", "--help", ">", "/dev/null"));
if ($? != 0) {
print "CURL is needed for this script, aborting with error\n";
exit 1;
}
initTesting();
sub createPostUpdateScript($)
+4 -4
Ver Arquivo
@@ -159,8 +159,8 @@ In order to make setup simple, you can use the provided Dockerfile to build your
1. Assuming you are in the root of the ownCloud Client's source tree, you can
build an image from this Dockerfile like this::
cd admin/win32/docker
docker build . -t ownCloud-client-win32:<version>
cd admin/win/docker
docker build . -t owncloud-client-win32:<version>
Replace ``<version>`` by the version of the client you are building, e.g.
|version| for the release of the client that this document describes.
@@ -174,8 +174,8 @@ In order to make setup simple, you can use the provided Dockerfile to build your
2. From within the source tree Run the docker instance::
docker run ownCloud-client-win32:<version> -v "$PWD:/home/jenkins/client" \
admin/win32/docker/build.sh $(id -u)
docker run owncloud-client-win32:<version> -v "$PWD:/home/jenkins/client" \
admin/win/docker/build.sh $(id -u)
It will run the build, create an NSIS based installer, as well as run tests.
You will find the resulting binary in an newly created ``build-win32`` subfolder.
+2 -2
Ver Arquivo
@@ -41,7 +41,7 @@ master_doc = 'index'
# General information about the project.
project = u'ownCloud Client Manual'
copyright = u'2013, The ownCloud developers'
copyright = u'2013-2016, The ownCloud developers'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
@@ -250,7 +250,7 @@ texinfo_documents = [
epub_title = u'ownCloud Client Manual'
epub_author = u'The ownCloud developers'
epub_publisher = u'The ownCloud developers'
epub_copyright = u'2013, The ownCloud developers'
epub_copyright = u'2013-2016, The ownCloud developers'
# The language of the text. It defaults to the language option
# or en if the language is not set.
Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 86 KiB

Depois

Largura:  |  Altura:  |  Tamanho: 52 KiB

Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 82 KiB

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 49 KiB

Depois

Largura:  |  Altura:  |  Tamanho: 58 KiB

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 58 KiB

Depois

Largura:  |  Altura:  |  Tamanho: 224 KiB

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 23 KiB

Depois

Largura:  |  Altura:  |  Tamanho: 20 KiB

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 24 KiB

Depois

Largura:  |  Altura:  |  Tamanho: 34 KiB

+3 -3
Ver Arquivo
@@ -4,16 +4,16 @@ ownCloud Desktop Client Manual
==============================
.. toctree::
:maxdepth: 3
:maxdepth: 2
introduction
installing
navigating
advancedusage
autoupdate
building
architecture
troubleshooting
faq
glossary
glossary
+12 -16
Ver Arquivo
@@ -12,26 +12,22 @@ Desktop Sync client enables you to:
Your files are always automatically synchronized between your ownCloud server
and local PC.
.. note:: Because of various technical issues, desktop sync clients older than
1.7 will not allowed to connect and sync with the ownCloud 8.1+ server. It
is highly recommended to keep your client updated.
Because of various technical issues, desktop sync clients older than 1.7 will
not allowed to connect and sync with the ownCloud 8.1+ server. It is highly
recommended to keep your client updated.
Improvements and New Features
-----------------------------
The 2.1 release of the ownCloud desktop sync client has many new features and
The 2.2 release of the ownCloud desktop sync client has many new features and
improvements. (See the `complete changelog
<https://owncloud.org/changelog/desktop/>`_.)
* Improved appearance on HiDPI screens
* Improved error messages
* Several fixes/improvements to the sharing dialog
* Several fixes/improvements to the server activity tab
* Allow changeable upload chunk size in owncloud.cfg
* Forget password on explicit sign-out
* Windows: Fix deleting and replacing of read-only files
* Share with internal ownCloud users from your desktop
* Separate views for server activity, sync activity, and errors
* Don't re-upload *eml-files if size and checksum are unchanged
* Improved upload/download progress indicator
* Show server notifications on the client
* Improved sync speed
* Improved handling of Win32 file locks and network files
* Improved user notifications about ignored files and conflicts
* Add warnings for old server versions
* Update of QtKeyChain to support Windows credential store
* Packaging of dolphin overlay icon module for bleeding edge distros
+29 -22
Ver Arquivo
@@ -62,6 +62,7 @@ This menu provides the following options:
* Recent Changes, showing latest activities
* Settings
* Help menu
* Pause synchronizations
* An option to log in or log out of all of your accounts at once
* Quit ownCloud, logging out and closing the client
@@ -83,7 +84,7 @@ have the following features:
* Connection status, showing which ownCloud server you are connected to, and
your ownCloud username.
* An **Account** button, which contains a dropdown menu with **Add New**,
**Log In/Log Out**, and **Remove**.
**Log Out**, and **Remove**.
* Used and available space on the server.
* Current synchronization status.
* **Add Folder Sync Connection** button, which is active only when you have
@@ -93,26 +94,17 @@ The little button with three dots (the overflow menu) that sits to the right of
the sync status bar offers four additional options:
* Open Folder
* Choose What to Sync
* Choose What to Sync (This appears only when your file tree is collapsed, and
expands the file tree)
* Pause Sync / Resume Sync
* Remove folder sync connection
**Open Folder** opens a file explorer window displaying the client-side folder
that is being synced.
**Choose What to Sync** opens the folder sync tree view. Use this to sync all
or only some of the folders in the folder tree.
**Open Folder** opens your local ownCloud sync folder.
**Pause Sync** pauses sync operations without making any changes to your
account. It will continue to update file and folder lists, without
downloading or updating files. To stop all sync activity use **Remove Sync**.
**Resume Sync** resumes sync operations.
**Remove Sync** removes the sync connection without removing the account. This
stops all sync activity, including file and folder list updates. If you want to
synchronize the folder tree again then click the **Add Folder Sync Connection**
button, and re-select the folder tree that you want to sync.
downloading or updating files. To stop all sync activity use **Remove
Folder Sync Connection**.
.. figure:: images/client-7.png
:alt: Extra options for sync operations
@@ -125,12 +117,10 @@ button, and re-select the folder tree that you want to sync.
Adding New Accounts
^^^^^^^^^^^^^^^^^^^
You may configure multiple ownCloud accounts in your desktop sync client.
Simply
You may configure multiple ownCloud accounts in your desktop sync client. Simply
click the **Account** > **Add New** button on any account tab to add a new
account, and then follow the account creation wizard. The new account will
appear as a new tab in the settings dialog, where you can adjust its settings
at
appear as a new tab in the settings dialog, where you can adjust its settings at
any time. Use **Account** > **Remove** to delete accounts.
File Manager Overlay Icons
@@ -175,9 +165,7 @@ the ``owncloud-client-nautilus`` plugin.) You can create share links, and share
with internal ownCloud users the same way as in your ownCloud Web interface.
.. figure:: images/mac-share.png
:alt: Sync client integration in Finder on Mac OS X.
*Shared ownCloud files in Finder on Mac OS X*
:alt: Sync client integration in Windows Explorer.
Right-click your systray icon, hover over the account you want to use, and
left-click "Open folder [folder name] to quickly enter your local ownCloud
@@ -206,6 +194,25 @@ such as files not synced.
.. figure:: images/client-8.png
:alt: Activity windows logs all server and client activities.
Server Notifications
--------------------
Starting with version 2.2.0, the client will display notifications from your
ownCloud server that require manual interaction by you. For example, when a
user on a remote ownCloud creates a new Federated share for you, you can accept
it from your desktop client.
The desktop client automatically checks for available notifications
automatically on a regular basis. Notifications are displayed in the Server
Activity tab, and if you have **Show Desktop Notifications** enabled (General
tab) you'll also see a systray notification.
.. figure:: images/client12.png
:alt: Activity window with notification.
This also displays notifications sent to users by the ownCloud admin via the
Announcements app.
General Window
--------------
+1 -1
Ver Arquivo
@@ -40,7 +40,7 @@ logs.
1. Output of `owncloud --logwindow` or `owncloud --logfile log.txt`
(On Windows using `cmd.exe`, you might need to first `cd` into the ownCloud directory)
(See also http://doc.owncloud.org/desktop/1.8/troubleshooting.html#client-logfile )
(See also http://doc.owncloud.org/desktop/2.2/troubleshooting.html#client-logfile )
2. Web server error log:
+146 -4
Ver Arquivo
@@ -11,11 +11,153 @@ X-GNOME-Autostart-Delay=3
# Translations
Comment[sq]=Klient njëkohësimesh @APPLICATION_NAME@ për desktop
GenericName[sq]=Njëkohësim Dosjesh
Name[sq]=Klient njëkohësimesh @APPLICATION_NAME@ për desktop
Icon[sq]=@APPLICATION_EXECUTABLE@
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
Icon[oc]=@APPLICATION_EXECUTABLE@
Comment[ca]=Client de sincronització d'escriptori @APPLICATION_NAME@
GenericName[ca]=Sincronització de carpetes
Name[ca]=Client de sincronització d'escriptori @APPLICATION_NAME@
Icon[ca]=@APPLICATION_EXECUTABLE@
Comment[da]=@APPLICATION_NAME@ skrivebordsklient til synkronisering
GenericName[da]=Mappesynkronisering
Name[da]=@APPLICATION_NAME@ skrivebordsklient til synk
Icon[da]=@APPLICATION_EXECUTABLE@
Comment[de]=@APPLICATION_NAME@ Desktop-Synchronisationsclient
GenericName[de]=Ordner-Synchronisation
Name[de]=@APPLICATION_NAME@ Desktop-Synchronisationsclient
Icon[de]=@APPLICATION_EXECUTABLE@
Comment[ja_JP]=@APPLICATION_NAME@ デスクトップ同期クライアント
GenericName[ja_JP]=フォルダ同期
Name[ja_JP]=@APPLICATION_NAME@ デスクトップ同期クライアント
Icon[ja_JP]=@APPLICATION_EXECUTABLE@
Comment[en_GB]=@APPLICATION_NAME@ desktop synchronisation client
GenericName[en_GB]=Folder Sync
Name[en_GB]=@APPLICATION_NAME@ desktop sync client
Icon[en_GB]=@APPLICATION_EXECUTABLE@
Comment[es]=@APPLICATION_NAME@ cliente de sincronización de escritorio
GenericName[es]=Sincronización de carpeta
Name[es]=@APPLICATION_NAME@ cliente de sincronización de escritorio
Icon[es]=@APPLICATION_EXECUTABLE@
Comment[de_DE]=@APPLICATION_NAME@ Desktop-Synchronisationsclient
GenericName[de_DE]=Ordner-Synchronisation
Name[de_DE]=@APPLICATION_NAME@ Desktop-Synchronisationsclient
Icon[de_DE]=@APPLICATION_EXECUTABLE@
Comment[fr]=@APPLICATION_NAME@ synchronisation du client
GenericName[fr]=Dossier de Synchronisation
Name[fr]=@APPLICATION_NAME@ synchronisation du client
Icon[fr]=@APPLICATION_EXECUTABLE@
Comment[he]=@APPLICATION_NAME@ לקוח סנכון שולחן עבודה
GenericName[he]=סנכון תיקייה
Name[he]=@APPLICATION_NAME@ לקוח סנכרון שולחן עבודה
Icon[he]=@APPLICATION_EXECUTABLE@
Comment[id]=Klien sinkronisasi desktop @APPLICATION_NAME@
GenericName[id]=Folder Sync
Name[id]=Klien sync desktop @APPLICATION_NAME@
Icon[id]=@APPLICATION_EXECUTABLE@
Comment[is]=@APPLICATION_NAME@ skjáborðsforrit samstillingar
GenericName[is]=Samstilling möppu
Name[is]=@APPLICATION_NAME@ skjáborðsforrit samstillingar
Icon[is]=@APPLICATION_EXECUTABLE@
Comment[it]=Client di sincronizzazione del desktop di @APPLICATION_NAME@
GenericName[it]=Sincronizzazione cartella
Name[it]=Client di sincronizzazione del desktop di @APPLICATION_NAME@
Icon[it]=@APPLICATION_EXECUTABLE@
Comment[ko]=@APPLICATION_NAME@ 데스크톱 동기화 클라이언트
GenericName[ko]=폴더 동기화
Name[ko]=@APPLICATION_NAME@ 데스크톱 동기화 클라이언트
Comment[nl]=@APPLICATION_NAME@ desktop synchronisatie client
GenericName[nl]=Mappen sync
Name[nl]=@APPLICATION_NAME@ desktop sync client
Icon[nl]=@APPLICATION_EXECUTABLE@
Comment[bg_BG]=@APPLICATION_NAME@ клиент за десктоп синхронизация
GenericName[bg_BG]=Синхронизиране на папката
Name[bg_BG]=@APPLICATION_NAME@ клиент десктоп синхронизация
Icon[bg_BG]=@APPLICATION_EXECUTABLE@
Comment[pt_BR]=@APPLICATION_NAME@ cliente de sincronização do computador
GenericName[pt_BR]=Sincronização de Pasta
Name[pt_BR]=@APPLICATION_NAME@ cliente de sincronização de desktop
Icon[pt_BR]=@APPLICATION_EXECUTABLE@
Comment[cs_CZ]=@APPLICATION_NAME@ počítačový synchronizační klient
GenericName[cs_CZ]=Synchronizace adresáře
Name[cs_CZ]=@APPLICATION_NAME@ počítačový synchronizační klient
Icon[cs_CZ]=@APPLICATION_EXECUTABLE@
Comment[ru]=Настольный клиент синхронизации @НАЗВАНИЕ_ПРИЛОЖЕНИЯ@
GenericName[ru]=Синхронизация папки
Name[ru]=Настольный клиент синхронизации @НАЗВАНИЕ_ПРИЛОЖЕНИЯ@
Icon[ru]=@ВЫПОЛНЯЕМОЕ_ПРИЛОЖЕНИЕ@
Comment[sl]=@APPLICATION_NAME@ Program za usklajevanje datotek z namizjem
GenericName[sl]=Usklajevanje map
Name[sl]=@APPLICATION_NAME@ Program za usklajevanje datotek z namizjem
Icon[sl]=@APPLICATION_EXECUTABLE@
Comment[sq]=Klient njëkohësimesh @APPLICATION_NAME@ për desktop
GenericName[sq]=Njëkohësim Dosjesh
Name[sq]=Klient njëkohësimesh @APPLICATION_NAME@ për desktop
Icon[sq]=@APPLICATION_EXECUTABLE@
Comment[tr]=@APPLICATION_NAME@ masaüstü senkronizasyon istemcisi
GenericName[tr]=Dosya Senkronizasyonu
Name[tr]=@APPLICATION_NAME@ masaüstü senkronizasyon istemcisi
Icon[tr]=@APPLICATION_EXECUTABLE@
Comment[uk]=Настільний клієнт синхронізації @APPLICATION_NAME@
GenericName[uk]=Синхронізація теки
Name[uk]=Настільний клієнт синхронізації @APPLICATION_NAME@
Icon[uk]=@APPLICATION_EXECUTABLE@
Comment[ro]=@APPLICATION_NAME@ client de sincronizare pe desktop
GenericName[ro]=Sincronizare director
Name[ro]=@APPLICATION_NAME@ client de sincronizare pe desktop
Icon[ro]=@APPLICATION_EXECUTABLE@
Comment[zh_CN]=@APPLICATION_NAME@ 桌面同步客户端
GenericName[zh_CN]=文件夹同步
Name[zh_CN]=@APPLICATION_NAME@ 桌面同步客户端
Icon[zh_CN]=@APPLICATION_EXECUTABLE@
GenericName[zh_TW]=資料夾同步
Comment[pt_PT]=@APPLICATION_NAME@ - Cliente de Sincronização para PC
GenericName[pt_PT]=Sincronizar Pasta
Name[pt_PT]=@APPLICATION_NAME@ - Cliente de Sincronização para PC
Icon[pt_PT]=@APPLICATION_EXECUTABLE@
Comment[th_TH]=@APPLICATION_NAME@ ไคลเอนต์ประสานข้อมูลเดสก์ท็อป
GenericName[th_TH]=ประสานข้อมูลโฟลเดอร์
Name[th_TH]= @APPLICATION_NAME@ ไคลเอนต์ประสานข้อมูลเดสก์ท็อป
Icon[th_TH]=@APPLICATION_EXECUTABLE@
+1 -1
Ver Arquivo
@@ -36,7 +36,7 @@ endif()
set(OWNCLOUDDOLPHINHELPER ${APPLICATION_EXECUTABLE}dolphinpluginhelper)
add_library(${OWNCLOUDDOLPHINHELPER} SHARED ownclouddolphinpluginhelper.cpp)
target_link_libraries(${OWNCLOUDDOLPHINHELPER} Qt5::Network)
generate_export_header(${OWNCLOUDDOLPHINHELPER})
generate_export_header(${OWNCLOUDDOLPHINHELPER} BASE_NAME ownclouddolphinpluginhelper)
install(TARGETS ${OWNCLOUDDOLPHINHELPER} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
#---OVERLAY PLUGIN---
+9 -5
Ver Arquivo
@@ -21,11 +21,15 @@ import socket
from gi.repository import GObject, Nautilus
print("Initializing owncloud-client-nautilus extension")
# Do not touch the following line.
# Please do not touch the following line.
# The reason is that we use a script to adopt this file for branding
# by replacing this line with the branding app name. If the following
# line is changed, the script can not match the pattern and fails.
appname = 'ownCloud'
print("Initializing "+appname+"-client-nautilus extension")
def get_local_path(url):
if url[0:7] == 'file://':
url = url[7:]
@@ -181,10 +185,10 @@ class MenuExtension(GObject.GObject, Nautilus.MenuProvider):
if not syncedFile:
return items
# Create an menu item
# Create a menu item
labelStr = "Share with " + appname + "..."
item = Nautilus.MenuItem(name='NautilusPython::ShareItem', label=labelStr,
tip='Share file %s through ownCloud' % file.get_name())
tip='Share file {} through {}'.format(file.get_name(), appname) )
item.connect("activate", self.menu_share, file)
items.append(item)
@@ -36,8 +36,7 @@ using namespace std;
OCClientInterface::ContextMenuInfo OCClientInterface::FetchInfo()
{
auto pipename = std::wstring(L"\\\\.\\pipe\\");
pipename += L"ownCloud";
auto pipename = CommunicationSocket::DefaultPipePath();
CommunicationSocket socket;
if (!WaitNamedPipe(pipename.data(), PIPE_TIMEOUT)) {
@@ -72,8 +71,7 @@ OCClientInterface::ContextMenuInfo OCClientInterface::FetchInfo()
void OCClientInterface::ShareObject(const std::wstring &path)
{
auto pipename = std::wstring(L"\\\\.\\pipe\\");
pipename += L"ownCloud";
auto pipename = CommunicationSocket::DefaultPipePath();
CommunicationSocket socket;
if (!WaitNamedPipe(pipename.data(), PIPE_TIMEOUT)) {
@@ -24,11 +24,31 @@
#include <fstream>
#define BUFSIZE 1024
#define DEFAULT_BUFLEN 4096
using namespace std;
#define DEFAULT_BUFLEN 4096
namespace {
std::wstring getUserName() {
DWORD len = DEFAULT_BUFLEN;
TCHAR buf[DEFAULT_BUFLEN];
if (GetUserName(buf, &len)) {
return std::wstring(&buf[0], len);
} else {
return std::wstring();
}
}
}
std::wstring CommunicationSocket::DefaultPipePath()
{
auto pipename = std::wstring(L"\\\\.\\pipe\\");
pipename += L"ownCloud\\";
pipename += getUserName();
return pipename;
}
CommunicationSocket::CommunicationSocket()
: _pipe(INVALID_HANDLE_VALUE)
@@ -26,6 +26,8 @@
class __declspec(dllexport) CommunicationSocket
{
public:
static std::wstring DefaultPipePath();
CommunicationSocket();
~CommunicationSocket();
@@ -43,4 +45,4 @@ private:
bool _connected;
};
#endif
#endif
@@ -31,25 +31,10 @@
using namespace std;
#define BUFSIZE 512
std::wstring getUserName() {
DWORD len = BUFSIZE;
TCHAR buf[BUFSIZE];
if (GetUserName(buf, &len)) {
return std::wstring(&buf[0], len);
} else {
return std::wstring();
}
}
// This code is run in a thread
void RemotePathChecker::workerThreadLoop()
{
auto pipename = std::wstring(L"\\\\.\\pipe\\");
pipename += L"ownCloud\\";
pipename += getUserName();
auto pipename = CommunicationSocket::DefaultPipePath();
bool connected = false;
CommunicationSocket socket;
std::unordered_set<std::wstring> asked;
+3 -7
Ver Arquivo
@@ -28,16 +28,12 @@
* \return string PEM
*/
string x509ToString(BIO *o) {
int len = 0;
BUF_MEM *bptr;
void* data;
string ret = "";
BIO_get_mem_ptr(o, &bptr);
len = bptr->length;
data = calloc(len+10, sizeof(char));
int len = bptr->length;
void* data = calloc(len+10, sizeof(char));
BIO_read(o, data, len);
ret = strdup((char*)data);
string ret = std::string(static_cast<char*>(data));
free(data);
return ret;
+9430 -1907
Ver Arquivo
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
+1478 -23
Ver Arquivo
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
+7 -7
Ver Arquivo
@@ -95,6 +95,9 @@ void AccountState::setState(State state)
} else if (oldState == SignedOut && _state == Disconnected) {
checkConnectivity();
}
if (oldState == Connected || _state == Connected) {
emit isConnectedChanged();
}
}
// might not have changed but the underlying _connectionErrors might have
@@ -149,11 +152,6 @@ bool AccountState::isConnectedOrTemporarilyUnavailable() const
return isConnected() || _state == ServiceUnavailable;
}
bool AccountState::canSync() const
{
return isConnected();
}
void AccountState::tagLastSuccessfullETagRequest()
{
_timeSinceLastETagCheck.restart();
@@ -192,7 +190,8 @@ void AccountState::checkConnectivity()
} else {
// Check the server and then the auth.
#ifdef Q_OS_WIN
// Let's try this for all OS and see if it fixes the Qt issues we have on Linux #4720 #3888 #4051
//#ifdef Q_OS_WIN
// There seems to be a bug in Qt on Windows where QNAM sometimes stops
// working correctly after the computer woke up from sleep. See #2895 #2899
// and #2973.
@@ -203,7 +202,7 @@ void AccountState::checkConnectivity()
// If we don't reset the ssl config a second CheckServerJob can produce a
// ssl config that does not have a sensible certificate chain.
account()->setSslConfiguration(QSslConfiguration());
#endif
//#endif
conValidator->checkServerAndAuth();
}
}
@@ -211,6 +210,7 @@ void AccountState::checkConnectivity()
void AccountState::slotConnectionValidatorResult(ConnectionValidator::Status status, const QStringList& errors)
{
if (isSignedOut()) {
qDebug() << "Signed out, ignoring" << connectionStatusString(status) << _account->url().toString();
return;
}
+1 -3
Ver Arquivo
@@ -102,9 +102,6 @@ public:
bool isConnected() const;
bool isConnectedOrTemporarilyUnavailable() const;
/// Returns whether sync actions are allowed to run.
bool canSync() const;
/// Triggers a ping to the server to update state and
/// connection status and errors.
void checkConnectivity();
@@ -130,6 +127,7 @@ private:
signals:
void stateChanged(int state);
void isConnectedChanged();
protected Q_SLOTS:
void slotConnectionValidatorResult(ConnectionValidator::Status status, const QStringList& errors);
+16
Ver Arquivo
@@ -248,6 +248,9 @@ void ActivityWidget::slotBuildNotificationDisplay(const ActivityList& list)
QHash<QString, int> accNotified;
QString listAccountName;
// Whether a new notification widget was added to the notificationLayout.
bool newNotificationShown = false;
foreach( auto activity, list ) {
if( _blacklistedNotifications.contains(activity)) {
qDebug() << Q_FUNC_INFO << "Activity in blacklist, skip";
@@ -271,6 +274,7 @@ void ActivityWidget::slotBuildNotificationDisplay(const ActivityList& list)
_ui->_notifyScroll->setSizeAdjustPolicy(QAbstractScrollArea::AdjustToContentsOnFirstShow);
#endif
_widgetForNotifId[activity.ident()] = widget;
newNotificationShown = true;
}
widget->setActivity( activity );
@@ -365,6 +369,10 @@ void ActivityWidget::slotBuildNotificationDisplay(const ActivityList& list)
const QString log = tr("%1 Notifications - Action Required").arg(Theme::instance()->appNameGUI());
emit guiLog( log, msg);
}
if (newNotificationShown) {
emit newNotification();
}
}
void ActivityWidget::slotSendNotificationRequest(const QString& accountName, const QString& link, const QByteArray& verb)
@@ -517,6 +525,7 @@ ActivitySettings::ActivitySettings(QWidget *parent)
connect(_activityWidget, SIGNAL(copyToClipboard()), this, SLOT(slotCopyToClipboard()));
connect(_activityWidget, SIGNAL(hideActivityTab(bool)), this, SLOT(setActivityTabHidden(bool)));
connect(_activityWidget, SIGNAL(guiLog(QString,QString)), this, SIGNAL(guiLog(QString,QString)));
connect(_activityWidget, SIGNAL(newNotification()), SLOT(slotShowActivityTab()));
_protocolWidget = new ProtocolWidget(this);
_tab->insertTab(1, _protocolWidget, Theme::instance()->syncStateIcon(SyncResult::Success), tr("Sync Protocol"));
@@ -582,6 +591,13 @@ void ActivitySettings::slotShowIssueItemCount(int cnt)
_tab->setTabText(_syncIssueTabId, cntText);
}
void ActivitySettings::slotShowActivityTab()
{
if (_activityTabId != -1) {
_tab->setCurrentIndex(_activityTabId);
}
}
void ActivitySettings::slotCopyToClipboard()
{
QString text;
+2 -1
Ver Arquivo
@@ -81,7 +81,7 @@ signals:
void copyToClipboard();
void rowsInserted();
void hideActivityTab(bool);
void newNotificationList(const ActivityList& list);
void newNotification();
private slots:
void slotBuildNotificationDisplay(const ActivityList& list);
@@ -143,6 +143,7 @@ private slots:
void setActivityTabHidden(bool hidden);
void slotRegularNotificationCheck();
void slotShowIssueItemCount(int cnt);
void slotShowActivityTab();
signals:
void guiLog(const QString&, const QString&);
+6 -1
Ver Arquivo
@@ -38,7 +38,12 @@ namespace OCC
class UserAgentWebPage : public QWebPage {
public:
UserAgentWebPage(QObject *parent) : QWebPage(parent) {}
UserAgentWebPage(QObject *parent) : QWebPage(parent)
{
if (!qgetenv("OWNCLOUD_SHIBBOLETH_DEBUG").isEmpty()) {
settings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, true);
}
}
QString userAgentForUrl(const QUrl &url ) const {
return QWebPage::userAgentForUrl(url) + " " + Utility::userAgentString();
}
+22 -18
Ver Arquivo
@@ -96,6 +96,7 @@ Folder::Folder(const FolderDefinition& definition,
if (!setIgnoredFiles())
qWarning("Could not read system exclude file");
connect(_accountState.data(), SIGNAL(isConnectedChanged()), this, SIGNAL(canSyncChanged()));
connect(_engine.data(), SIGNAL(rootEtag(QString)), this, SLOT(etagRetreivedFromSyncEngine(QString)));
connect(_engine.data(), SIGNAL(treeWalkResult(const SyncFileItemVector&)),
this, SLOT(slotThreadTreeWalkResult(const SyncFileItemVector&)), Qt::QueuedConnection);
@@ -230,7 +231,7 @@ bool Folder::syncPaused() const
bool Folder::canSync() const
{
return !syncPaused() && accountState()->canSync();
return !syncPaused() && accountState()->isConnected();
}
void Folder::setSyncPaused( bool paused )
@@ -249,6 +250,7 @@ void Folder::setSyncPaused( bool paused )
}
emit syncPausedChanged(this, paused);
emit syncStateChange();
emit canSyncChanged();
}
void Folder::setSyncState(SyncResult::Status state)
@@ -318,6 +320,7 @@ void Folder::slotRunEtagJob()
// sync if it's different.
_requestEtagJob = new RequestEtagJob(account, remotePath(), this);
_requestEtagJob->setTimeout(60*1000);
// check if the etag is different
QObject::connect(_requestEtagJob, SIGNAL(etagRetreived(QString)), this, SLOT(etagRetreived(QString)));
FolderMan::instance()->slotScheduleETagJob(alias(), _requestEtagJob);
@@ -576,19 +579,10 @@ int Folder::slotWipeErrorBlacklist()
void Folder::slotWatchedPathChanged(const QString& path)
{
// When no sync is running or it's in the prepare phase, we can
// always schedule a new sync.
if (! _engine->isSyncRunning() || _syncResult.status() == SyncResult::SyncPrepare) {
emit watchedFileChangedExternally(path);
emit scheduleToSync(this);
return;
}
// The folder watcher fires a lot of bogus notifications during
// a sync operation, both for actual user files and the database
// and log. Therefore we check notifications against operations
// the sync is doing to filter out our own changes.
bool ownChange = false;
#ifdef Q_OS_MAC
Q_UNUSED(path)
// On OSX the folder watcher does not report changes done by our
@@ -598,14 +592,23 @@ void Folder::slotWatchedPathChanged(const QString& path)
const auto maxNotificationDelay = 15*1000;
qint64 time = _engine->timeSinceFileTouched(path);
if (time != -1 && time < maxNotificationDelay) {
ownChange = true;
return;
}
#endif
if (! ownChange) {
emit watchedFileChangedExternally(path);
emit scheduleToSync(this);
// Check that the mtime actually changed.
if (path.startsWith(this->path())) {
auto relativePath = path.mid(this->path().size());
auto record = _journal.getFileRecord(relativePath);
if (record.isValid() && !FileSystem::fileChanged(path, record._fileSize,
Utility::qDateTimeToTime_t(record._modtime))) {
qDebug() << "Ignoring spurious notification for file" << relativePath;
return; // probably a spurious notification
}
}
emit watchedFileChangedExternally(path);
emit scheduleToSync(this);
}
void Folder::slotThreadTreeWalkResult(const SyncFileItemVector& items)
@@ -628,7 +631,7 @@ void Folder::removeFromSettings() const
{
auto settings = _accountState->settings();
settings->beginGroup(QLatin1String("Folders"));
settings->remove(_definition.alias);
settings->remove(FolderMan::escapeAlias(_definition.alias));
}
bool Folder::isFileExcludedAbsolute(const QString& fullPath) const
@@ -686,7 +689,8 @@ void Folder::wipe()
QFile::remove( stateDbFile + "-wal" );
QFile::remove( stateDbFile + "-journal" );
FolderMan::instance()->socketApi()->slotRegisterPath(alias());
if (canSync())
FolderMan::instance()->socketApi()->slotRegisterPath(alias());
}
bool Folder::setIgnoredFiles()
@@ -912,7 +916,7 @@ void Folder::slotFolderDiscovered(bool, QString folderName)
// and hand the result over to the progress dispatcher.
void Folder::slotTransmissionProgress(const ProgressInfo &pi)
{
if( !pi.hasStarted() ) {
if( !pi.isUpdatingEstimates() ) {
// this is the beginning of a sync, set the warning level to 0
_syncResult.setWarnCount(0);
}
@@ -998,7 +1002,7 @@ void Folder::slotAboutToRemoveAllFiles(SyncFileItem::Direction, bool *cancel)
void Folder::slotAboutToRestoreBackup(bool *restore)
{
QString msg =
tr("This sync would reset the files to an erlier time in the sync folder '%1'.\n"
tr("This sync would reset the files to an earlier time in the sync folder '%1'.\n"
"This might be because a backup was restored on the server.\n"
"Continuing the sync as normal will cause all your files to be overwritten by an older "
"file in an earlier state. "
+1 -2
Ver Arquivo
@@ -131,8 +131,6 @@ public:
/**
* Returns true when the folder may sync.
*
* !syncPaused() && accountState->canSync().
*/
bool canSync() const;
@@ -203,6 +201,7 @@ signals:
void progressInfo(const ProgressInfo& progress);
void newBigFolderDiscovered(const QString &); // A new folder bigger than the threshold was discovered
void syncPausedChanged(Folder*, bool paused);
void canSyncChanged();
/**
* Fires for each change inside this folder that wasn't caused
+15 -2
Ver Arquivo
@@ -157,7 +157,8 @@ void FolderMan::registerFolderMonitor( Folder *folder )
}
// register the folder with the socket API
_socketApi->slotRegisterPath(folder->alias());
if (folder->canSync())
_socketApi->slotRegisterPath(folder->alias());
}
void FolderMan::addMonitorPath( const QString& alias, const QString& path )
@@ -427,6 +428,17 @@ void FolderMan::slotFolderSyncPaused( Folder *f, bool paused )
}
}
void FolderMan::slotFolderCanSyncChanged()
{
Folder *f = qobject_cast<Folder*>(sender());
Q_ASSERT(f);
if (f->canSync()) {
_socketApi->slotRegisterPath(f->alias());
} else {
_socketApi->slotUnregisterPath(f->alias());
}
}
// this really terminates the current sync process
// ie. no questions, no prisoners
// csync still remains in a stable state, regardless of that.
@@ -549,7 +561,7 @@ void FolderMan::slotAccountStateChanged()
}
QString accountName = accountState->account()->displayName();
if (accountState->canSync()) {
if (accountState->isConnected()) {
qDebug() << "Account" << accountName << "connected, scheduling its folders";
foreach (Folder *f, _folderMap.values()) {
@@ -820,6 +832,7 @@ Folder* FolderMan::addFolderInternal(FolderDefinition folderDefinition, AccountS
connect(folder, SIGNAL(syncFinished(SyncResult)), SLOT(slotFolderSyncFinished(SyncResult)));
connect(folder, SIGNAL(syncStateChange()), SLOT(slotForwardFolderSyncStateChange()));
connect(folder, SIGNAL(syncPausedChanged(Folder*,bool)), SLOT(slotFolderSyncPaused(Folder*,bool)));
connect(folder, SIGNAL(canSyncChanged()), SLOT(slotFolderCanSyncChanged()));
connect(&folder->syncEngine().syncFileStatusTracker(), SIGNAL(fileStatusChanged(const QString &, SyncFileStatus)),
_socketApi.data(), SLOT(slotFileStatusChanged(const QString &, SyncFileStatus)));
connect(folder, SIGNAL(watchedFileChangedExternally(QString)),
+1
Ver Arquivo
@@ -144,6 +144,7 @@ signals:
public slots:
void slotRemoveFolder( Folder* );
void slotFolderSyncPaused(Folder *, bool paused);
void slotFolderCanSyncChanged();
void slotFolderSyncStarted();
void slotFolderSyncFinished( const SyncResult& );
+1 -1
Ver Arquivo
@@ -584,7 +584,7 @@ void FolderStatusModel::slotUpdateDirectories(const QStringList &list)
QStringList sortedSubfolders = list;
// skip the parent item (first in the list)
sortedSubfolders.erase(sortedSubfolders.begin());
sortedSubfolders.sort();
Utility::sortFilenames(sortedSubfolders);
QVarLengthArray<int, 10> undecidedIndexes;
+15 -1
Ver Arquivo
@@ -51,6 +51,14 @@ static void callback(
Q_UNUSED(eventFlags)
Q_UNUSED(eventIds)
const FSEventStreamEventFlags c_interestingFlags
= kFSEventStreamEventFlagItemCreated // for new folder/file
| kFSEventStreamEventFlagItemRemoved // for rm
| kFSEventStreamEventFlagItemInodeMetaMod // for mtime change
| kFSEventStreamEventFlagItemRenamed // also coming for moves to trash in finder
| kFSEventStreamEventFlagItemModified; // for content change
//We ignore other flags, e.g. for owner change, xattr change, Finder label change etc
qDebug() << "FolderWatcherPrivate::callback by OS X";
QStringList paths;
@@ -62,8 +70,14 @@ static void callback(
CFIndex pathLength = CFStringGetLength(path);
qstring.resize(pathLength);
CFStringGetCharacters(path, CFRangeMake(0, pathLength), reinterpret_cast<UniChar *>(qstring.data()));
QString fn = qstring.normalized(QString::NormalizationForm_C);
paths.append(qstring.normalized(QString::NormalizationForm_C));
if (!(eventFlags[i] & c_interestingFlags)) {
qDebug() << "Ignoring non-content changes for" << fn;
continue;
}
paths.append(fn);
}
reinterpret_cast<FolderWatcherPrivate*>(clientCallBackInfo)->doNotifyParent(paths);
+7 -18
Ver Arquivo
@@ -68,13 +68,6 @@ FolderWizardLocalPath::FolderWizardLocalPath()
_ui.localFolderLineEdit->setText( QDir::toNativeSeparators( defaultPath ) );
_ui.localFolderLineEdit->setToolTip(tr("Enter the path to the local folder."));
QString newAlias = Theme::instance()->appName();
int count = 0;
while (FolderMan::instance()->folder(newAlias)) {
// There is already a folder configured with this name and folder names need to be unique
newAlias = Theme::instance()->appName() + QString::number(++count);
}
_ui.warnLabel->setTextFormat(Qt::RichText);
_ui.warnLabel->hide();
}
@@ -135,14 +128,6 @@ void FolderWizardLocalPath::slotChooseLocalFolder()
if (!dir.isEmpty()) {
// set the last directory component name as alias
_ui.localFolderLineEdit->setText(QDir::toNativeSeparators(dir));
QDir pickedDir(dir);
QString newAlias = pickedDir.dirName();
int count = 0;
while (FolderMan::instance()->folder(newAlias)) {
// There is already a folder configured with this name and folder names need to be unique
newAlias = pickedDir.dirName() + QString::number(++count);
}
}
emit completeChanged();
}
@@ -323,7 +308,7 @@ void FolderWizardRemotePath::slotUpdateDirectories(const QStringList &list)
root->setData(0, Qt::UserRole, "/");
}
QStringList sortedList = list;
sortedList.sort();
Utility::sortFilenames(sortedList);
foreach (QString path, sortedList) {
path.remove(webdavFolder);
QStringList paths = path.split('/');
@@ -503,11 +488,13 @@ FolderWizardSelectiveSync::~FolderWizardSelectiveSync()
void FolderWizardSelectiveSync::initializePage()
{
QString alias = wizard()->field(QLatin1String("alias")).toString();
QString targetPath = wizard()->property("targetPath").toString();
if (targetPath.startsWith('/')) {
targetPath = targetPath.mid(1);
}
QString alias = QFileInfo(targetPath).fileName();
if (alias.isEmpty())
alias = Theme::instance()->appName();
_treeView->setFolderInfo(targetPath, alias);
QWizardPage::initializePage();
}
@@ -520,8 +507,10 @@ bool FolderWizardSelectiveSync::validatePage()
void FolderWizardSelectiveSync::cleanupPage()
{
QString alias = wizard()->field(QLatin1String("alias")).toString();
QString targetPath = wizard()->property("targetPath").toString();
QString alias = QFileInfo(targetPath).fileName();
if (alias.isEmpty())
alias = Theme::instance()->appName();
_treeView->setFolderInfo(targetPath, alias);
QWizardPage::cleanupPage();
}
+6 -5
Ver Arquivo
@@ -47,18 +47,19 @@ int main(int argc, char **argv)
{
Q_INIT_RESOURCE(client);
#ifndef Q_OS_MAC
#ifdef Q_OS_WIN
// If the font size ratio is set on Windows, we need to
// enable the auto pixelRatio in Qt since we don't
// want to use sizes relative to the font size everywhere.
// This is automatic on OS X, but opt-in on Windows and Linux
// https://doc-snapshots.qt.io/qt5-5.6/highdpi.html#qt-support
#if QT_VERSION < QT_VERSION_CHECK(5, 6, 0)
qputenv("QT_DEVICE_PIXEL_RATIO", "auto");
#else
// We do not define it on linux so the behaviour is kept the same
// as other Qt apps in the desktop environment. (which may or may
// not set this envoronment variable)
#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)
qputenv("QT_AUTO_SCREEN_SCALE_FACTOR", "1");
#endif
#endif // !Q_OS_MAC
#endif // !Q_OS_WIN
#ifdef Q_OS_MAC
Mac::CocoaInitializer cocoaInit; // RIIA
+1 -1
Ver Arquivo
@@ -685,7 +685,7 @@ void ownCloudGui::slotUpdateProgress(const QString &folder, const ProgressInfo&
slotRebuildRecentMenus();
}
if (progress.hasStarted()
if (progress.isUpdatingEstimates()
&& progress.completedFiles() >= progress.totalFiles()
&& progress._currentDiscoveredFolder.isEmpty()) {
QTimer::singleShot(2000, this, SLOT(slotDisplayIdle()));
+1 -1
Ver Arquivo
@@ -173,7 +173,7 @@ void OwncloudSetupWizard::slotNoOwnCloudFoundAuth(QNetworkReply *reply)
// Allow the credentials dialog to pop up again for the same URL.
// Maybe the user just clicked 'Cancel' by accident or changed his mind.
_ocWizard->account()->resetSslCertErrorState();
_ocWizard->account()->resetRejectedCertificates();
}
void OwncloudSetupWizard::slotNoOwnCloudFoundAuthTimeout(const QUrl&url)
+10 -3
Ver Arquivo
@@ -57,9 +57,15 @@ ProtocolWidget::ProtocolWidget(QWidget *parent) :
header << tr("Action");
header << tr("Size");
int timestampColumnExtra = 0;
#ifdef Q_OS_WIN
timestampColumnExtra = 20; // font metrics are broken on Windows, see #4721
#endif
_ui->_treeWidget->setHeaderLabels( header );
int timestampColumnWidth =
_ui->_treeWidget->fontMetrics().width(timeString(QDateTime::currentDateTime()));
_ui->_treeWidget->fontMetrics().width(timeString(QDateTime::currentDateTime()))
+ timestampColumnExtra;
_ui->_treeWidget->setColumnWidth(0, timestampColumnWidth);
_ui->_treeWidget->setColumnWidth(1, 180);
_ui->_treeWidget->setColumnCount(5);
@@ -84,7 +90,8 @@ ProtocolWidget::ProtocolWidget(QWidget *parent) :
_issueItemView->setHeaderLabels( header );
timestampColumnWidth =
ActivityItemDelegate::rowHeight() // icon
+ _issueItemView->fontMetrics().width(timeString(QDateTime::currentDateTime()));
+ _issueItemView->fontMetrics().width(timeString(QDateTime::currentDateTime()))
+ timestampColumnExtra;
_issueItemView->setColumnWidth(0, timestampColumnWidth);
_issueItemView->setColumnWidth(1, 180);
_issueItemView->setColumnCount(4);
@@ -212,7 +219,7 @@ QTreeWidgetItem* ProtocolWidget::createCompletedTreewidgetItem(const QString& fo
void ProtocolWidget::slotProgressInfo( const QString& folder, const ProgressInfo& progress )
{
if( !progress.hasStarted() ) {
if( !progress.isUpdatingEstimates() ) {
// The sync is restarting, clean the old items
cleanItems(folder);
} else if (progress.completedFiles() >= progress.totalFiles()) {
+1 -1
Ver Arquivo
@@ -222,7 +222,7 @@ void SelectiveSyncTreeView::slotUpdateDirectories(QStringList list)
}
}
list.sort();
Utility::sortFilenames(list);
foreach (QString path, list) {
auto size = job ? job->_sizes.value(path) : 0;
path.remove(pathToRemove);
+26
Ver Arquivo
@@ -16,6 +16,7 @@
#include "ui_sharelinkwidget.h"
#include "account.h"
#include "capabilities.h"
#include "creds/abstractcredentials.h"
#include "share.h"
@@ -23,6 +24,7 @@
#include <QBuffer>
#include <QClipboard>
#include <QFileInfo>
#include <QDesktopServices>
namespace OCC {
@@ -53,6 +55,10 @@ ShareLinkWidget::ShareLinkWidget(AccountPtr account,
_ui->pushButton_copy->setEnabled(false);
connect(_ui->pushButton_copy, SIGNAL(clicked(bool)), SLOT(slotPushButtonCopyLinkPressed()));
_ui->pushButton_mail->setIcon(QIcon::fromTheme("mail-send"));
_ui->pushButton_mail->setEnabled(false);
connect(_ui->pushButton_mail, SIGNAL(clicked(bool)), SLOT(slotPushButtonMailLinkPressed()));
// the following progress indicator widgets are added to layouts which makes them
// automatically deleted once the dialog dies.
_pi_link = new QProgressIndicator();
@@ -224,6 +230,7 @@ void ShareLinkWidget::slotSharesFetched(const QList<QSharedPointer<Share>> &shar
if (share->getShareType() == Share::TypeLink) {
_share = qSharedPointerDynamicCast<LinkShare>(share);
_ui->pushButton_copy->show();
_ui->pushButton_mail->show();
_ui->widget_shareLink->show();
_ui->checkBox_shareLink->setChecked(true);
@@ -268,6 +275,7 @@ void ShareLinkWidget::slotSharesFetched(const QList<QSharedPointer<Share>> &shar
}
setShareLink(_share->getLink().toString());
_ui->pushButton_mail->setEnabled(true);
_ui->pushButton_copy->setEnabled(true);
// Connect all shares signals to gui slots
@@ -324,6 +332,7 @@ void ShareLinkWidget::setShareLink( const QString& url )
if( realUrl.isValid() ) {
_shareUrl = url;
_ui->pushButton_copy->setEnabled(true);
_ui->pushButton_mail->setEnabled(true);
} else {
_shareUrl.clear();
_ui->_labelShareLink->setText(QString::null);
@@ -339,6 +348,7 @@ void ShareLinkWidget::slotDeleteShareFetched()
_ui->lineEdit_password->clear();
_ui->_labelShareLink->clear();
_ui->pushButton_copy->setEnabled(false);
_ui->pushButton_mail->setEnabled(false);
_ui->widget_shareLink->hide();
_ui->lineEdit_password->hide();
_ui->pushButton_setPassword->setEnabled(false);
@@ -368,6 +378,7 @@ void ShareLinkWidget::slotCheckBoxShareLinkClicked()
_ui->checkBox_editing->setEnabled(false);
_ui->lineEdit_password->setFocus();
_ui->pushButton_copy->hide();
_ui->pushButton_mail->hide();
_ui->widget_shareLink->show();
slotCheckBoxPasswordClicked();
@@ -413,6 +424,7 @@ void ShareLinkWidget::slotCreateShareRequiresPassword(const QString& message)
_ui->lineEdit_password->setEnabled(true);
_ui->lineEdit_password->setFocus();
_ui->pushButton_copy->hide();
_ui->pushButton_mail->hide();
_ui->widget_shareLink->show();
_ui->checkBox_expire->setEnabled(false);
_ui->checkBox_editing->setEnabled(false);
@@ -473,6 +485,20 @@ void ShareLinkWidget::slotPushButtonCopyLinkPressed()
#endif
}
void ShareLinkWidget::slotPushButtonMailLinkPressed()
{
QString fileName = _sharePath.mid(_sharePath.lastIndexOf('/') + 1);
QDesktopServices::openUrl(QUrl(QString(
"mailto: "
"?subject=%1 has shared %2 with you"
"&body=%3").arg(
_account->credentials()->user(),
fileName,
_shareUrl),
QUrl::TolerantMode));
}
void ShareLinkWidget::slotCheckBoxEditingClicked()
{
ShareLinkWidget::setPublicUpload(_ui->checkBox_editing->checkState() == Qt::Checked);
+1
Ver Arquivo
@@ -68,6 +68,7 @@ private slots:
void slotPasswordReturnPressed();
void slotPasswordChanged(const QString& newText);
void slotPushButtonCopyLinkPressed();
void slotPushButtonMailLinkPressed();
void slotCheckBoxEditingClicked();
void slotPublicUploadSet();
+7
Ver Arquivo
@@ -195,6 +195,13 @@
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_mail">
<property name="text">
<string>&amp;Mail link</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_copy">
<property name="text">
+1 -3
Ver Arquivo
@@ -72,9 +72,7 @@ ShareUserGroupWidget::ShareUserGroupWidget(AccountPtr account,
_completer->setModel(_completerModel);
_completer->setCaseSensitivity(Qt::CaseInsensitive);
#if QT_VERSION >= QT_VERSION_CHECK(5, 2, 0)
_completer->setFilterMode(Qt::MatchContains);
#endif
_completer->setCompletionMode(QCompleter::UnfilteredPopupCompletion);
_ui->shareeLineEdit->setCompleter(_completer);
_manager = new ShareManager(_account, this);
+35 -18
Ver Arquivo
@@ -56,6 +56,13 @@
// The second number should be changed when there are new features.
#define MIRALL_SOCKET_API_VERSION "1.0"
static inline QString removeTrailingSlash(QString path)
{
Q_ASSERT(path.endsWith(QLatin1Char('/')));
path.truncate(path.length()-1);
return path;
}
namespace OCC {
#define DEBUG qDebug() << "SocketApi: "
@@ -141,8 +148,10 @@ void SocketApi::slotNewConnection()
_listeners.append(socket);
foreach( Folder *f, FolderMan::instance()->map() ) {
QString message = buildRegisterPathMessage(f->path());
sendMessage(socket, message);
if (f->canSync()) {
QString message = buildRegisterPathMessage(removeTrailingSlash(f->path()));
sendMessage(socket, message);
}
}
}
@@ -181,20 +190,31 @@ void SocketApi::slotReadSocket()
void SocketApi::slotRegisterPath( const QString& alias )
{
// Make sure not to register twice to each connected client
if (_registeredAliases.contains(alias))
return;
Folder *f = FolderMan::instance()->folder(alias);
if (f) {
QString message = buildRegisterPathMessage(f->path());
QString message = buildRegisterPathMessage(removeTrailingSlash(f->path()));
foreach(QIODevice *socket, _listeners) {
sendMessage(socket, message);
}
}
_registeredAliases.insert(alias);
}
void SocketApi::slotUnregisterPath( const QString& alias )
{
if (!_registeredAliases.contains(alias))
return;
Folder *f = FolderMan::instance()->folder(alias);
if (f)
broadcastMessage(QLatin1String("UNREGISTER_PATH"), f->path(), QString::null, true );
broadcastMessage(QLatin1String("UNREGISTER_PATH"), removeTrailingSlash(f->path()), QString::null, true );
_registeredAliases.remove(alias);
}
void SocketApi::slotUpdateFolderView(Folder *f)
@@ -212,10 +232,11 @@ void SocketApi::slotUpdateFolderView(Folder *f)
f->syncResult().status() == SyncResult::Error ||
f->syncResult().status() == SyncResult::SetupError ) {
broadcastMessage(QLatin1String("STATUS"), f->path() ,
QString rootPath = removeTrailingSlash(f->path());
broadcastMessage(QLatin1String("STATUS"), rootPath,
f->syncEngine().syncFileStatusTracker().fileStatus("").toSocketAPIString());
broadcastMessage(QLatin1String("UPDATE_VIEW"), f->path() );
broadcastMessage(QLatin1String("UPDATE_VIEW"), rootPath);
} else {
qDebug() << "Not sending UPDATE_VIEW for" << f->alias() << "because status() is" << f->syncResult().status();
}
@@ -275,8 +296,6 @@ void SocketApi::command_RETRIEVE_FOLDER_STATUS(const QString& argument, QIODevic
void SocketApi::command_RETRIEVE_FILE_STATUS(const QString& argument, QIODevice* socket)
{
const QString nopString("NOP");
if( !socket ) {
qDebug() << "No valid socket object.";
return;
@@ -289,18 +308,16 @@ void SocketApi::command_RETRIEVE_FILE_STATUS(const QString& argument, QIODevice*
Folder* syncFolder = FolderMan::instance()->folderForPath( argument );
if (!syncFolder) {
// this can happen in offline mode e.g.: nothing to worry about
statusString = nopString;
statusString = QLatin1String("NOP");
} else {
const QString file = QDir::cleanPath(argument).mid(syncFolder->cleanPath().length()+1);
// future: Send more specific states for paused, disconnected etc.
if( syncFolder->syncPaused() || !syncFolder->accountState()->isConnected() ) {
statusString = nopString;
} else {
SyncFileStatus fileStatus = syncFolder->syncEngine().syncFileStatusTracker().fileStatus(file);
statusString = fileStatus.toSocketAPIString();
QString relativePath = QDir::cleanPath(argument).mid(syncFolder->cleanPath().length()+1);
if( relativePath.endsWith(QLatin1Char('/')) ) {
relativePath.truncate(relativePath.length()-1);
qWarning() << "Removed trailing slash for directory: " << relativePath << "Status pushes won't have one.";
}
SyncFileStatus fileStatus = syncFolder->syncEngine().syncFileStatusTracker().fileStatus(relativePath);
statusString = fileStatus.toSocketAPIString();
}
const QString message = QLatin1String("STATUS:") % statusString % QLatin1Char(':') % QDir::toNativeSeparators(argument);
+1
Ver Arquivo
@@ -77,6 +77,7 @@ private:
Q_INVOKABLE void command_SHARE_MENU_TITLE(const QString& argument, QIODevice* socket);
QString buildRegisterPathMessage(const QString& path);
QSet<QString> _registeredAliases;
QList<QIODevice*> _listeners;
SocketApiServer _localServer;
};
+2
Ver Arquivo
@@ -218,6 +218,7 @@ void OCUpdater::slotVersionInfoArrived()
{
_timeoutWatchdog->stop();
QNetworkReply *reply = qobject_cast<QNetworkReply*>(sender());
reply->deleteLater();
if( reply->error() != QNetworkReply::NoError ) {
qDebug() << "Failed to reach version check url: " << reply->errorString();
return;
@@ -258,6 +259,7 @@ void NSISUpdater::slotWriteFile()
void NSISUpdater::slotDownloadFinished()
{
QNetworkReply *reply = qobject_cast<QNetworkReply*>(sender());
reply->deleteLater();
if (reply->error() != QNetworkReply::NoError) {
setDownloadState(DownloadFailed);
return;
+1
Ver Arquivo
@@ -242,6 +242,7 @@ void AbstractNetworkJob::slotTimeout()
reply()->abort();
} else {
qDebug() << Q_FUNC_INFO << this << "Timeout reply was NULL";
deleteLater();
}
}
+17 -6
Ver Arquivo
@@ -40,7 +40,6 @@ Account::Account(QObject *parent)
, _capabilities(QVariantMap())
, _am(0)
, _credentials(0)
, _treatSslErrorsAsFailure(false)
, _davPath( Theme::instance()->webDavPath() )
, _wasMigrated(false)
{
@@ -329,9 +328,9 @@ void Account::addApprovedCerts(const QList<QSslCertificate> certs)
_approvedCerts += certs;
}
void Account::resetSslCertErrorState()
void Account::resetRejectedCertificates()
{
_treatSslErrorsAsFailure = false;
_rejectedCertificates.clear();
}
void Account::setSslErrorHandler(AbstractSslErrorHandler *handler)
@@ -412,8 +411,15 @@ void Account::slotHandleSslErrors(QNetworkReply *reply , QList<QSslError> errors
<< error.errorString() << "("<< error.error() << ")" << "\n";
}
if( _treatSslErrorsAsFailure ) {
// User decided once not to trust. Honor this decision.
bool allPreviouslyRejected = true;
foreach (const QSslError &error, errors) {
if (!_rejectedCertificates.contains(error.certificate())) {
allPreviouslyRejected = false;
}
}
// If all certs have previously been rejected by the user, don't ask again.
if( allPreviouslyRejected ) {
qDebug() << out << "Certs not trusted by user decision, returning.";
return;
}
@@ -436,7 +442,12 @@ void Account::slotHandleSslErrors(QNetworkReply *reply , QList<QSslError> errors
// certificate changes.
reply->ignoreSslErrors(errors);
} else {
_treatSslErrorsAsFailure = true;
// Mark all involved certificates as rejected, so we don't ask the user again.
foreach (const QSslError &error, errors) {
if (!_rejectedCertificates.contains(error.certificate())) {
_rejectedCertificates.append(error.certificate());
}
}
// if during normal operation, a new certificate was MITM'ed, and the user does not
// ACK it, the running request must be aborted and the QNAM must be reset, to not
// treat the new cert as granted. See bug #3283
+5 -2
Ver Arquivo
@@ -133,7 +133,7 @@ public:
// Usually when a user explicitly rejects a certificate we don't
// ask again. After this call, a dialog will again be shown when
// the next unknown certificate is encountered.
void resetSslCertErrorState();
void resetRejectedCertificates();
// pluggable handler
void setSslErrorHandler(AbstractSslErrorHandler *handler);
@@ -216,7 +216,10 @@ private:
QuotaInfo *_quotaInfo;
QNetworkAccessManager *_am;
AbstractCredentials* _credentials;
bool _treatSslErrorsAsFailure;
/// Certificates that were explicitly rejected by the user
QList<QSslCertificate> _rejectedCertificates;
static QString _configFileName;
QByteArray _pemCertificate;
QString _pemPrivateKey;
+3 -3
Ver Arquivo
@@ -111,9 +111,9 @@ bool OWNCLOUDSYNC_EXPORT rename(const QString& originFileName,
*
* @return true if the file's mtime or size are not what is expected.
*/
bool fileChanged(const QString& fileName,
qint64 previousSize,
time_t previousMtime);
bool OWNCLOUDSYNC_EXPORT fileChanged(const QString& fileName,
qint64 previousSize,
time_t previousMtime);
/**
* @brief Like !fileChanged() but with verbose logging if the file *did* change.
-21
Ver Arquivo
@@ -542,27 +542,6 @@ void OwncloudPropagator::scheduleNextJob()
}
}
void OwncloudPropagator::addTouchedFile(const QString& fn)
{
QString file = QDir::cleanPath(fn);
QElapsedTimer timer;
timer.start();
QMutexLocker lock(&_touchedFilesMutex);
_touchedFiles.insert(file, timer);
}
qint64 OwncloudPropagator::timeSinceFileTouched(const QString& fn) const
{
QMutexLocker lock(&_touchedFilesMutex);
if (! _touchedFiles.contains(fn)) {
return -1;
}
return _touchedFiles[fn].elapsed();
}
AccountPtr OwncloudPropagator::account() const
{
return _account;
+21 -16
Ver Arquivo
@@ -297,7 +297,12 @@ public:
QAtomicInt _abortRequested; // boolean set by the main thread to abort.
/* The list of currently active jobs */
/** The list of currently active jobs.
This list contains the jobs that are currently using ressources and is used purely to
know how many jobs there is currently running for the scheduler.
Jobs add themself to the list when they do an assynchronous operation.
Jobs can be several time on the list (example, when several chunks are uploaded in parallel)
*/
QList<PropagateItemJob*> _activeJobList;
/** We detected that another sync is required after this one */
@@ -325,18 +330,6 @@ public:
/** returns the size of chunks in bytes */
static quint64 chunkSize();
/** Records that a file was touched by a job.
*
* Thread-safe.
*/
void addTouchedFile(const QString& fn);
/** Get the ms since a file was touched, or -1 if it wasn't.
*
* Thread-safe.
*/
qint64 timeSinceFileTouched(const QString& fn) const;
AccountPtr account() const;
enum DiskSpaceResult
@@ -372,13 +365,25 @@ signals:
/** Emitted when propagation has problems with a locked file. */
void seenLockedFile(const QString &fileName);
/** Emitted when propagation touches a file.
*
* Used to track our own file modifications such that notifications
* from the file watcher about these can be ignored.
*/
void touchedFile(const QString &fileName);
private:
AccountPtr _account;
/** Stores the time since a job touched a file. */
QHash<QString, QElapsedTimer> _touchedFiles;
mutable QMutex _touchedFilesMutex;
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
// access to signals which are protected in Qt4
friend class PropagateDownloadFileQNAM;
friend class PropagateUploadFileQNAM;
friend class PropagateLocalMkdir;
friend class PropagateLocalRename;
friend class PropagateRemoteMove;
#endif
};
+56 -10
Ver Arquivo
@@ -127,27 +127,65 @@ void ProgressDispatcher::setProgressInfo(const QString& folder, const ProgressIn
emit progressInfo( folder, progress );
}
void ProgressInfo::start()
ProgressInfo::ProgressInfo()
{
connect(&_updateEstimatesTimer, SIGNAL(timeout()), SLOT(updateEstimates()));
reset();
}
void ProgressInfo::reset()
{
_currentItems.clear();
_currentDiscoveredFolder.clear();
_sizeProgress = Progress();
_fileProgress = Progress();
_totalSizeOfCompletedJobs = 0;
_maxBytesPerSecond = 100000.0;
_maxFilesPerSecond = 2.0;
_updateEstimatesTimer.stop();
}
void ProgressInfo::startEstimateUpdates()
{
_updateEstimatesTimer.start(1000);
}
bool ProgressInfo::hasStarted() const
bool ProgressInfo::isUpdatingEstimates() const
{
return _updateEstimatesTimer.isActive();
}
static bool shouldCountProgress(const SyncFileItem &item)
{
const auto instruction = item._instruction;
// Don't worry about directories that won't have propagation
// jobs associated with them.
if (item._isDirectory
&& (instruction == CSYNC_INSTRUCTION_NONE
|| instruction == CSYNC_INSTRUCTION_SYNC
|| instruction == CSYNC_INSTRUCTION_CONFLICT)) {
return false;
}
// Skip any ignored or error files, we do nothing with them.
if (instruction == CSYNC_INSTRUCTION_IGNORE
|| instruction == CSYNC_INSTRUCTION_ERROR) {
return false;
}
return true;
}
void ProgressInfo::adjustTotalsForFile(const SyncFileItem &item)
{
if (!item._isDirectory) {
_fileProgress._total++;
if (isSizeDependent(item)) {
_sizeProgress._total += item._size;
}
} else if (item._instruction != CSYNC_INSTRUCTION_NONE) {
// Added or removed directories certainly count.
_fileProgress._total++;
if (!shouldCountProgress(item)) {
return;
}
_fileProgress._total += item._affectedItems;
if (isSizeDependent(item)) {
_sizeProgress._total += item._size;
}
}
@@ -178,6 +216,10 @@ quint64 ProgressInfo::completedSize() const
void ProgressInfo::setProgressComplete(const SyncFileItem &item)
{
if (!shouldCountProgress(item)) {
return;
}
_currentItems.remove(item._file);
_fileProgress.setCompleted(_fileProgress._completed + item._affectedItems);
if (ProgressInfo::isSizeDependent(item)) {
@@ -189,6 +231,10 @@ void ProgressInfo::setProgressComplete(const SyncFileItem &item)
void ProgressInfo::setProgressItem(const SyncFileItem &item, quint64 completed)
{
if (!shouldCountProgress(item)) {
return;
}
_currentItems[item._file]._item = item;
_currentItems[item._file]._progress._total = item._size;
_currentItems[item._file]._progress.setCompleted(completed);
+10 -10
Ver Arquivo
@@ -37,27 +37,27 @@ class OWNCLOUDSYNC_EXPORT ProgressInfo : public QObject
{
Q_OBJECT
public:
ProgressInfo()
: _totalSizeOfCompletedJobs(0)
, _maxFilesPerSecond(2.0)
, _maxBytesPerSecond(100000.0)
{}
ProgressInfo();
/** Resets for a new sync run.
*/
void reset();
/**
* Called when propagation starts.
*
* hasStarted() will return true afterwards.
* isUpdatingEstimates() will return true afterwards.
*/
void start();
void startEstimateUpdates();
/**
* Returns true when propagation has started (start() was called).
* Returns true when startEstimateUpdates() was called.
*
* This is used when the SyncEngine wants to indicate a new sync
* is about to start via the transmissionProgress() signal. The
* first ProgressInfo will have hasStarted() == false.
* first ProgressInfo will have isUpdatingEstimates() == false.
*/
bool hasStarted() const;
bool isUpdatingEstimates() const;
/**
* Increase the file and size totals by the amount indicated in item.
+3 -4
Ver Arquivo
@@ -592,8 +592,8 @@ void PropagateDownloadFileQNAM::deleteExistingFolder()
QString conflictDir = FileSystem::makeConflictFileName(
existingDir, Utility::qDateTimeFromTime_t(_item->_modtime));
_propagator->addTouchedFile(existingDir);
_propagator->addTouchedFile(conflictDir);
emit _propagator->touchedFile(existingDir);
emit _propagator->touchedFile(conflictDir);
QString renameError;
if (!FileSystem::rename(existingDir, conflictDir, &renameError)) {
done(SyncFileItem::NormalError, renameError);
@@ -654,7 +654,6 @@ static void preserveGroupOwnership(const QString& fileName, const QFileInfo& fi)
}
} // end namespace
void PropagateDownloadFileQNAM::transmissionChecksumValidated(const QByteArray &checksumType, const QByteArray &checksum)
{
const auto theContentChecksumType = contentChecksumType();
@@ -754,7 +753,7 @@ void PropagateDownloadFileQNAM::downloadFinished()
}
QString error;
_propagator->addTouchedFile(fn);
emit _propagator->touchedFile(fn);
// The fileChanged() check is done above to generate better error messages.
if (!FileSystem::uncheckedRenameReplace(_tmpFile.fileName(), fn, &error)) {
qDebug() << Q_FUNC_INFO << QString("Rename failed: %1 => %2").arg(_tmpFile.fileName()).arg(fn);
+2 -2
Ver Arquivo
@@ -80,8 +80,8 @@ void PropagateRemoteMove::start()
QString versionString = _propagator->account()->serverVersion();
if (versionString.contains('.') && versionString.split('.')[0].toInt() < 7) {
QString originalFile(_propagator->getFilePath(QLatin1String("Shared")));
_propagator->addTouchedFile(originalFile);
_propagator->addTouchedFile(targetFile);
emit _propagator->touchedFile(originalFile);
emit _propagator->touchedFile(targetFile);
QString renameError;
if( FileSystem::rename(targetFile, originalFile, &renameError) ) {
done(SyncFileItem::NormalError, tr("This folder must not be renamed. It is renamed back to its original name."));
+14 -4
Ver Arquivo
@@ -209,8 +209,6 @@ void PropagateUploadFileQNAM::slotComputeContentChecksum()
return;
}
_propagator->_activeJobList.removeOne(this);
const QString filePath = _propagator->getFilePath(_item->_file);
// remember the modtime before checksumming to be able to detect a file
@@ -274,6 +272,10 @@ void PropagateUploadFileQNAM::slotComputeTransmissionChecksum(const QByteArray&
void PropagateUploadFileQNAM::slotStartUpload(const QByteArray& transmissionChecksumType, const QByteArray& transmissionChecksum)
{
// Remove ourselfs from the list of active job, before any posible call to done()
// When we start chunks, we will add it again, once for every chunks.
_propagator->_activeJobList.removeOne(this);
_transmissionChecksum = transmissionChecksum;
_transmissionChecksumType = transmissionChecksumType;
@@ -398,7 +400,7 @@ qint64 UploadDevice::readData(char* data, qint64 maxlen) {
if (isBandwidthLimited()) {
maxlen = qMin(maxlen, _bandwidthQuota);
if (maxlen <= 0) { // no quota
qDebug() << "no quota";
//qDebug() << "no quota";
return 0;
}
_bandwidthQuota -= maxlen;
@@ -544,8 +546,16 @@ void PropagateUploadFileQNAM::startNextChunk()
_transmissionChecksumType, _transmissionChecksum);
}
if (! device->prepareAndOpen(_propagator->getFilePath(_item->_file), chunkStart, currentChunkSize)) {
const QString fileName = _propagator->getFilePath(_item->_file);
if (! device->prepareAndOpen(fileName, chunkStart, currentChunkSize)) {
qDebug() << "ERR: Could not prepare upload device: " << device->errorString();
// If the file is currently locked, we want to retry the sync
// when it becomes available again.
if (FileSystem::isFileLocked(fileName)) {
emit _propagator->seenLockedFile(fileName);
}
// Soft error because this is likely caused by the user modifying his files while syncing
abortWithError( SyncFileItem::SoftError, device->errorString() );
delete device;
+3 -3
Ver Arquivo
@@ -163,7 +163,7 @@ void PropagateLocalMkdir::start()
done( SyncFileItem::NormalError, tr("Attention, possible case sensitivity clash with %1").arg(newDirStr) );
return;
}
_propagator->addTouchedFile(newDirStr);
emit _propagator->touchedFile(newDirStr);
QDir localDir(_propagator->_localDir);
if (!localDir.mkpath(_item->_file)) {
done( SyncFileItem::NormalError, tr("could not create folder %1").arg(newDirStr) );
@@ -217,8 +217,8 @@ void PropagateLocalRename::start()
return;
}
_propagator->addTouchedFile(existingFile);
_propagator->addTouchedFile(targetFile);
emit _propagator->touchedFile(existingFile);
emit _propagator->touchedFile(targetFile);
QString renameError;
if (!FileSystem::rename(existingFile, targetFile, &renameError)) {
done(SyncFileItem::NormalError, renameError);
+51 -12
Ver Arquivo
@@ -95,6 +95,10 @@ SyncEngine::SyncEngine(AccountPtr account, const QString& localPath,
_excludedFiles.reset(new ExcludedFiles(&_csync_ctx->excludes));
_syncFileStatusTracker.reset(new SyncFileStatusTracker(this));
_clearTouchedFilesTimer.setSingleShot(true);
_clearTouchedFilesTimer.setInterval(30*1000);
connect(&_clearTouchedFilesTimer, SIGNAL(timeout()), SLOT(slotClearTouchedFiles()));
_thread.setObjectName("SyncEngine_Thread");
}
@@ -203,6 +207,12 @@ QString SyncEngine::csyncErrorToString(CSYNC_STATUS err)
}
/**
* Check if the item is in the blacklist.
* If it should not be sync'ed because of the blacklist, update the item with the error instruction
* and proper error message, and return true.
* If the item is not in the blacklist, or the blacklist is stale, return false.
*/
bool SyncEngine::checkErrorBlacklisting( SyncFileItem &item )
{
if( !_journal ) {
@@ -234,6 +244,9 @@ bool SyncEngine::checkErrorBlacklisting( SyncFileItem &item )
} else if( item._modtime != entry._lastTryModtime ) {
qDebug() << item._file << " is blacklisted, but has changed mtime!";
return false;
} else if( item._renameTarget != entry._renameTarget) {
qDebug() << item._file << " is blacklisted, but rename target changed from" << entry._renameTarget;
return false;
}
} else if( item._direction == SyncFileItem::Down ) {
// download, check the etag.
@@ -424,6 +437,9 @@ int SyncEngine::treewalkFile( TREE_WALK_FILE *file, bool remote )
case CSYNC_STATUS_INDIVIDUAL_IS_INVALID_CHARS:
item->_errorString = tr("Filename contains invalid characters that can not be synced cross platform.");
break;
case CSYNC_STATUS_INDIVIDUAL_TRAILING_SPACE:
item->_errorString = tr("Filename contains trailing spaces.");
break;
case CSYNC_STATUS_INDIVIDUAL_EXCLUDE_LONG_FILENAME:
item->_errorString = tr("Filename is too long.");
break;
@@ -539,10 +555,10 @@ int SyncEngine::treewalkFile( TREE_WALK_FILE *file, bool remote )
bool directoryEtagUpdate = isDirectory && file->should_update_metadata;
bool localMetadataUpdate = !remote && file->should_update_metadata;
if (!directoryEtagUpdate) {
item->_isDirectory = isDirectory;
if (localMetadataUpdate) {
// Hack, we want a local metadata update to happen, but only if the
// remote tree doesn't ask us to do some kind of propagation.
item->_isDirectory = isDirectory;
_syncItemMap.insert(key, item);
}
emit syncItemDiscovered(*item);
@@ -571,7 +587,7 @@ int SyncEngine::treewalkFile( TREE_WALK_FILE *file, bool remote )
// An upload of an existing file means that the file was left unchanged on the server
// This counts as a NONE for detecting if all the files on the server were changed
_hasNoneFiles = true;
} else if (!item->_isDirectory) {
} else if (!isDirectory) {
if (std::difftime(file->modtime, file->other.modtime) < 0) {
// We are going back on time
_backInTimeFiles++;
@@ -672,6 +688,9 @@ void SyncEngine::startSync()
s_anySyncRunning = true;
_syncRunning = true;
_anotherSyncNeeded = false;
_clearTouchedFilesTimer.stop();
_progressInfo->reset();
if (!QDir(_localPath).exists()) {
// No _tr, it should only occur in non-mirall
@@ -909,7 +928,7 @@ void SyncEngine::slotDiscoveryJobFinished(int discoveryResult)
emit aboutToPropagate(_syncedItems);
// it's important to do this before ProgressInfo::start(), to announce start of new sync
emit transmissionProgress(*_progressInfo);
_progressInfo->start();
_progressInfo->startEstimateUpdates();
// post update phase script: allow to tweak stuff by a custom script in debug mode.
if( !qgetenv("OWNCLOUD_POST_UPDATE_SCRIPT").isEmpty() ) {
@@ -934,6 +953,7 @@ void SyncEngine::slotDiscoveryJobFinished(int discoveryResult)
this, SLOT(slotProgress(const SyncFileItem &,quint64)));
connect(_propagator.data(), SIGNAL(finished()), this, SLOT(slotFinished()), Qt::QueuedConnection);
connect(_propagator.data(), SIGNAL(seenLockedFile(QString)), SIGNAL(seenLockedFile(QString)));
connect(_propagator.data(), SIGNAL(touchedFile(QString)), SLOT(slotAddTouchedFile(QString)));
// apply the network limits to the propagator
setNetworkLimits(_uploadLimit, _downloadLimit);
@@ -1030,6 +1050,8 @@ void SyncEngine::finalize(bool success)
// Delete the propagator only after emitting the signal.
_propagator.clear();
_clearTouchedFilesTimer.start();
}
void SyncEngine::slotProgress(const SyncFileItem& item, quint64 current)
@@ -1244,15 +1266,18 @@ void SyncEngine::checkForPermission()
}
}
#if 0 /* We don't like the idea of renaming behind user's back, as the user may be working with the files */
if (!sourceOK && !destinationOK) {
#ifdef OWNCLOUD_RESTORE_RENAME /* We don't like the idea of renaming behind user's back, as the user may be working with the files */
if (!sourceOK && (!destinationOK || isRename)
// (not for directory because that's more complicated with the contents that needs to be adjusted)
&& !(*it)->_isDirectory) {
// Both the source and the destination won't allow move. Move back to the original
std::swap((*it)->_file, (*it)->_renameTarget);
(*it)->_direction = SyncFileItem::Down;
(*it)->_errorString = tr("Move not allowed, item restored");
(*it)->_isRestoration = true;
qDebug() << "checkForPermission: MOVING BACK" << (*it)->_file;
// in case something does wrong, we will not do it next time
_journal->avoidRenamesOnNextSync((*it)->_file);
} else
#endif
if (!sourceOK || !destinationOK) {
@@ -1342,20 +1367,34 @@ SyncFileItem* SyncEngine::findSyncItem(const QString &fileName) const
{
Q_FOREACH(const SyncFileItemPtr &item, _syncedItems) {
// Directories will appear in this list as well, and will get their status set once all children have been propagated
if ((item->_file == fileName || item->_renameTarget == fileName))
if ((item->_file == fileName || (!item->_renameTarget.isEmpty() && item->_renameTarget == fileName)))
return item.data();
}
return 0;
}
void SyncEngine::slotAddTouchedFile(const QString& fn)
{
QString file = QDir::cleanPath(fn);
QElapsedTimer timer;
timer.start();
_touchedFiles.insert(file, timer);
}
void SyncEngine::slotClearTouchedFiles()
{
_touchedFiles.clear();
}
qint64 SyncEngine::timeSinceFileTouched(const QString& fn) const
{
// This copy is essential for thread safety.
QSharedPointer<OwncloudPropagator> prop = _propagator;
if (prop) {
return prop->timeSinceFileTouched(fn);
if (! _touchedFiles.contains(fn)) {
return -1;
}
return -1;
return _touchedFiles[fn].elapsed();
}
AccountPtr SyncEngine::account() const
+12
Ver Arquivo
@@ -157,6 +157,12 @@ private slots:
void slotDiscoveryJobFinished(int updateResult);
void slotCleanPollsJobAborted(const QString &error);
/** Records that a file was touched by a job. */
void slotAddTouchedFile(const QString& fn);
/** Wipes the _touchedFiles hash */
void slotClearTouchedFiles();
private:
void handleSyncError(CSYNC *ctx, const char *state);
@@ -256,6 +262,12 @@ private:
CSyncChecksumHook _checksum_hook;
bool _anotherSyncNeeded;
/** Stores the time since a job touched a file. */
QHash<QString, QElapsedTimer> _touchedFiles;
/** For clearing the _touchedFiles variable after sync finished */
QTimer _clearTouchedFilesTimer;
};
}
+55 -85
Ver Arquivo
@@ -28,14 +28,15 @@ static SyncFileStatus::SyncFileStatusTag lookupProblem(const QString &pathToMatc
// qDebug() << Q_FUNC_INFO << pathToMatch << severity << problemPath;
if (problemPath == pathToMatch) {
return severity;
} else if (severity == SyncFileStatus::StatusError && problemPath.startsWith(pathToMatch) && problemPath.at(pathToMatch.size()) == '/') {
Q_ASSERT(!pathToMatch.endsWith('/'));
} else if (severity == SyncFileStatus::StatusError
&& problemPath.startsWith(pathToMatch)
&& (pathToMatch.isEmpty() || problemPath.at(pathToMatch.size()) == '/')) {
return SyncFileStatus::StatusWarning;
} else if (!problemPath.startsWith(pathToMatch)) {
// Starting at lower_bound we get the first path that is not smaller,
// since: "/a/" < "/a/aa" < "/a/aa/aaa" < "/a/ab/aba"
// If problemMap keys are ["/a/aa/aaa", "/a/ab/aba"] and pathToMatch == "/a/aa",
// lower_bound(pathToMatch) will point to "/a/aa/aaa", and the moment that
// since: "a/" < "a/aa" < "a/aa/aaa" < "a/ab/aba"
// If problemMap keys are ["a/aa/aaa", "a/ab/aba"] and pathToMatch == "a/aa",
// lower_bound(pathToMatch) will point to "a/aa/aaa", and the moment that
// problemPath.startsWith(pathToMatch) == false, we know that we've looked
// at everything that interest us.
break;
@@ -68,95 +69,64 @@ static inline bool showWarningInSocketApi(const SyncFileItem& item)
|| status == SyncFileItem::Restoration;
}
static inline bool showSyncInSocketApi( const SyncFileItem& item)
{
const auto inst = item._instruction;
return inst == CSYNC_INSTRUCTION_NEW;
}
SyncFileStatusTracker::SyncFileStatusTracker(SyncEngine *syncEngine)
: _syncEngine(syncEngine)
{
connect(syncEngine, SIGNAL(aboutToPropagate(SyncFileItemVector&)),
this, SLOT(slotAboutToPropagate(SyncFileItemVector&)));
SLOT(slotAboutToPropagate(SyncFileItemVector&)));
connect(syncEngine, SIGNAL(itemCompleted(const SyncFileItem&, const PropagatorJob&)),
this, SLOT(slotItemCompleted(const SyncFileItem&)));
connect(syncEngine, SIGNAL(started()),
SLOT(slotClearDirtyPaths()));
SLOT(slotItemCompleted(const SyncFileItem&)));
connect(syncEngine, SIGNAL(started()), SLOT(slotClearDirtyPaths()));
connect(syncEngine, SIGNAL(started()), SLOT(slotSyncEngineRunningChanged()));
connect(syncEngine, SIGNAL(finished(bool)), SLOT(slotSyncEngineRunningChanged()));
}
SyncFileStatus SyncFileStatusTracker::rootStatus()
SyncFileItem SyncFileStatusTracker::rootSyncFileItem()
{
/* Possible values for the status:
enum SyncFileStatusTag {
StatusNone,
StatusSync,
StatusWarning,
StatusUpToDate,
StatusError,
};
*/
SyncFileStatus status = SyncFileStatus::StatusUpToDate;
if( !_syncEngine ) return SyncFileStatus::StatusNone;
if( _syncEngine->isSyncRunning() ) {
status = SyncFileStatus::StatusSync;
} else {
// sync is not running. Check dirty list and _syncProblems
int errs = 0;
for (auto it = _syncProblems.begin(); it != _syncProblems.end(); ++it) {
if( it->second == SyncFileStatus::StatusError ) {
errs ++;
break; // stop if an error found at all.
}
}
if( errs ) {
status = SyncFileStatus::StatusWarning; // some files underneath had errors
}
// Only warnings do not change the root emblem away from ok.
}
return status;
SyncFileItem fakeRootItem;
// It's is not entirely correct to use the sync's status as we'll show the root folder as
// syncing even though no child might end up being propagated, but will give us something
// better than always UpToDate for now.
fakeRootItem._status = _syncEngine->isSyncRunning() ? SyncFileItem::NoStatus : SyncFileItem::Success;
fakeRootItem._isDirectory = true;
return fakeRootItem;
}
SyncFileStatus SyncFileStatusTracker::fileStatus(const QString& systemFileName)
SyncFileStatus SyncFileStatusTracker::fileStatus(const QString& relativePath)
{
QString fileName = systemFileName.normalized(QString::NormalizationForm_C);
if( fileName.endsWith(QLatin1Char('/')) ) {
fileName.truncate(fileName.length()-1);
qDebug() << "Removed trailing slash: " << fileName;
// normalization is required for OS X to match file names properly
QString normalizedRelativePath = relativePath.normalized(QString::NormalizationForm_C);
Q_ASSERT(!normalizedRelativePath.endsWith(QLatin1Char('/')));
if (normalizedRelativePath.isEmpty()) {
// This is the root sync folder, it doesn't have an entry in the database and won't be walked by csync, so create one manually.
return syncFileItemStatus(rootSyncFileItem());
}
if( fileName.isEmpty() ) {
// this is the root sync folder.
return rootStatus();
}
// The SyncEngine won't notify us at all for CSYNC_FILE_SILENTLY_EXCLUDED
// and CSYNC_FILE_EXCLUDE_AND_REMOVE excludes. Even though it's possible
// that the status of CSYNC_FILE_EXCLUDE_LIST excludes will change if the user
// update the exclude list at runtime and doing it statically here removes
// our ability to notify changes through the fileStatusChanged signal,
// it's an acceptable compromize to treat all exclude types the same.
if( _syncEngine->excludedFiles().isExcluded(_syncEngine->localPath() + fileName,
if( _syncEngine->excludedFiles().isExcluded(_syncEngine->localPath() + normalizedRelativePath,
_syncEngine->localPath(),
_syncEngine->ignoreHiddenFiles()) ) {
return SyncFileStatus(SyncFileStatus::StatusWarning);
}
if ( _dirtyPaths.contains(fileName) )
if ( _dirtyPaths.contains(normalizedRelativePath) )
return SyncFileStatus::StatusSync;
SyncFileItem* item = _syncEngine->findSyncItem(fileName);
SyncFileItem* item = _syncEngine->findSyncItem(normalizedRelativePath);
if (item) {
return fileStatus(*item);
return syncFileItemStatus(*item);
}
// If we're not currently syncing that file, look it up in the database to know if it's shared
SyncJournalFileRecord rec = _syncEngine->journal()->getFileRecord(fileName);
SyncJournalFileRecord rec = _syncEngine->journal()->getFileRecord(normalizedRelativePath);
if (rec.isValid()) {
return fileStatus(rec.toSyncFileItem());
return syncFileItemStatus(rec.toSyncFileItem());
}
// Must be a new file, wait for the filesystem watcher to trigger a sync
return SyncFileStatus();
@@ -185,10 +155,8 @@ void SyncFileStatusTracker::slotAboutToPropagate(SyncFileItemVector& items)
_syncProblems[item->_file] = SyncFileStatus::StatusError;
} else if (showWarningInSocketApi(*item)) {
_syncProblems[item->_file] = SyncFileStatus::StatusWarning;
} else if( showSyncInSocketApi(*item)) {
_syncProblems[item->_file] = SyncFileStatus::StatusSync;
}
emit fileStatusChanged(getSystemDestination(*item), fileStatus(*item));
emit fileStatusChanged(getSystemDestination(item->destination()), syncFileItemStatus(*item));
}
// Make sure to push any status that might have been resolved indirectly since the last sync
@@ -200,7 +168,7 @@ void SyncFileStatusTracker::slotAboutToPropagate(SyncFileItemVector& items)
SyncFileStatus::SyncFileStatusTag severity = it->second;
if (severity == SyncFileStatus::StatusError)
invalidateParentPaths(path);
emit fileStatusChanged(_syncEngine->localPath() + path, fileStatus(path));
emit fileStatusChanged(getSystemDestination(path), fileStatus(path));
}
}
@@ -213,15 +181,16 @@ void SyncFileStatusTracker::slotItemCompleted(const SyncFileItem &item)
invalidateParentPaths(item.destination());
} else if (showWarningInSocketApi(item)) {
_syncProblems[item._file] = SyncFileStatus::StatusWarning;
} else if (showSyncInSocketApi(item)) {
// new items that were in state sync can now be erased
_syncProblems.erase(item._file);
} else {
// There is currently no situation where an error status set during discovery/update is fixed by propagation.
Q_ASSERT(_syncProblems.find(item._file) == _syncProblems.end());
_syncProblems.erase(item._file);
}
emit fileStatusChanged(getSystemDestination(item), fileStatus(item));
emit fileStatusChanged(getSystemDestination(item.destination()), syncFileItemStatus(item));
}
void SyncFileStatusTracker::slotSyncEngineRunningChanged()
{
emit fileStatusChanged(_syncEngine->localPath(), syncFileItemStatus(rootSyncFileItem()));
}
void SyncFileStatusTracker::slotClearDirtyPaths()
@@ -231,11 +200,13 @@ void SyncFileStatusTracker::slotClearDirtyPaths()
_dirtyPaths.clear();
}
SyncFileStatus SyncFileStatusTracker::fileStatus(const SyncFileItem& item)
SyncFileStatus SyncFileStatusTracker::syncFileItemStatus(const SyncFileItem& item)
{
// Hack to know if the item was taken from the sync engine (Sync), or from the database (UpToDate)
bool waitingForPropagation = item._direction != SyncFileItem::None && item._status == SyncFileItem::NoStatus;
// Mark any directory in the SyncEngine's items as syncing, this is currently how we mark parent directories
// of currently syncing items since the PropagateDirectory job will mark the directorie's SyncFileItem::_status as Success
// once all child jobs have been completed.
bool waitingForPropagation = (item._isDirectory || item._direction != SyncFileItem::None) && item._status == SyncFileItem::NoStatus;
SyncFileStatus status(SyncFileStatus::StatusUpToDate);
if (waitingForPropagation) {
status.set(SyncFileStatus::StatusSync);
@@ -262,20 +233,19 @@ void SyncFileStatusTracker::invalidateParentPaths(const QString& path)
QStringList splitPath = path.split('/', QString::SkipEmptyParts);
for (int i = 0; i < splitPath.size(); ++i) {
QString parentPath = QStringList(splitPath.mid(0, i)).join(QLatin1String("/"));
emit fileStatusChanged(_syncEngine->localPath() + parentPath, fileStatus(parentPath));
emit fileStatusChanged(getSystemDestination(parentPath), fileStatus(parentPath));
}
}
QString SyncFileStatusTracker::getSystemDestination(const SyncFileItem& item)
QString SyncFileStatusTracker::getSystemDestination(const QString& relativePath)
{
QString systemFileName = _syncEngine->localPath() + item.destination();
// the trailing slash for directories must be appended as the filenames coming in
// from the plugins have that too. Otherwise the matching entry item is not found
// in the plugin.
if( item._type == SyncFileItem::Type::Directory ) {
systemFileName += QLatin1Char('/');
QString systemPath = _syncEngine->localPath() + relativePath;
// SyncEngine::localPath() has a trailing slash, make sure to remove it if the
// destination is empty.
if( systemPath.endsWith(QLatin1Char('/')) ) {
systemPath.truncate(systemPath.length()-1);
}
return systemFileName;
return systemPath;
}
}
+5 -4
Ver Arquivo
@@ -35,7 +35,7 @@ class OWNCLOUDSYNC_EXPORT SyncFileStatusTracker : public QObject
Q_OBJECT
public:
explicit SyncFileStatusTracker(SyncEngine* syncEngine);
SyncFileStatus fileStatus(const QString& systemFileName);
SyncFileStatus fileStatus(const QString& relativePath);
public slots:
void slotPathTouched(const QString& fileName);
@@ -46,14 +46,15 @@ signals:
private slots:
void slotAboutToPropagate(SyncFileItemVector& items);
void slotItemCompleted(const SyncFileItem& item);
void slotSyncEngineRunningChanged();
void slotClearDirtyPaths();
private:
SyncFileStatus fileStatus(const SyncFileItem& item);
SyncFileStatus rootStatus();
SyncFileStatus syncFileItemStatus(const SyncFileItem& item);
SyncFileItem rootSyncFileItem();
void invalidateParentPaths(const QString& path);
QString getSystemDestination(const SyncFileItem& syncEnginePath);
QString getSystemDestination(const QString& relativePath);
SyncEngine* _syncEngine;
+15 -4
Ver Arquivo
@@ -409,7 +409,7 @@ bool SyncJournalDb::checkConnect()
_deleteFileRecordRecursively.reset(new SqlQuery(_db));
_deleteFileRecordRecursively->prepare("DELETE FROM metadata WHERE path LIKE(?||'/%')");
QString sql( "SELECT lastTryEtag, lastTryModtime, retrycount, errorstring, lastTryTime, ignoreDuration "
QString sql( "SELECT lastTryEtag, lastTryModtime, retrycount, errorstring, lastTryTime, ignoreDuration, renameTarget "
"FROM blacklist WHERE path=?1");
if( Utility::fsCasePreserving() ) {
// if the file system is case preserving we have to check the blacklist
@@ -421,8 +421,8 @@ bool SyncJournalDb::checkConnect()
_setErrorBlacklistQuery.reset(new SqlQuery(_db));
_setErrorBlacklistQuery->prepare("INSERT OR REPLACE INTO blacklist "
"(path, lastTryEtag, lastTryModtime, retrycount, errorstring, lastTryTime, ignoreDuration) "
"VALUES ( ?1, ?2, ?3, ?4, ?5, ?6, ?7)");
"(path, lastTryEtag, lastTryModtime, retrycount, errorstring, lastTryTime, ignoreDuration, renameTarget) "
"VALUES ( ?1, ?2, ?3, ?4, ?5, ?6, ?7, ?8)");
_getSelectiveSyncListQuery.reset(new SqlQuery(_db));
_getSelectiveSyncListQuery->prepare("SELECT path FROM selectivesync WHERE type=?1");
@@ -612,6 +612,15 @@ bool SyncJournalDb::updateErrorBlacklistTableStructure()
}
commitInternal("update database structure: add lastTryTime, ignoreDuration cols");
}
if( columns.indexOf(QLatin1String("renameTarget")) == -1 ) {
SqlQuery query(_db);
query.prepare("ALTER TABLE blacklist ADD COLUMN renameTarget VARCHAR(4096);");
if( !query.exec() ) {
sqlFail("updateBlacklistTableStructure: Add renameTarget", query);
re = false;
}
commitInternal("update database structure: add lastTryTime, ignoreDuration cols");
}
SqlQuery query(_db);
query.prepare("CREATE INDEX IF NOT EXISTS blacklist_index ON blacklist(path collate nocase);");
@@ -1224,6 +1233,7 @@ SyncJournalErrorBlacklistRecord SyncJournalDb::errorBlacklistEntry( const QStrin
entry._errorString = _getErrorBlacklistQuery->stringValue(3);
entry._lastTryTime = _getErrorBlacklistQuery->int64Value(4);
entry._ignoreDuration = _getErrorBlacklistQuery->int64Value(5);
entry._renameTarget = _getErrorBlacklistQuery->stringValue(6);
entry._file = file;
}
_getErrorBlacklistQuery->reset_and_clear_bindings();
@@ -1335,13 +1345,14 @@ void SyncJournalDb::updateErrorBlacklistEntry( const SyncJournalErrorBlacklistRe
_setErrorBlacklistQuery->bindValue(5, item._errorString);
_setErrorBlacklistQuery->bindValue(6, QString::number(item._lastTryTime));
_setErrorBlacklistQuery->bindValue(7, QString::number(item._ignoreDuration));
_setErrorBlacklistQuery->bindValue(8, item._renameTarget);
if( !_setErrorBlacklistQuery->exec() ) {
QString bug = _setErrorBlacklistQuery->error();
qDebug() << "SQL exec blacklistitem insert or replace failed: "<< bug;
}
qDebug() << "set blacklist entry for " << item._file << item._retryCount
<< item._errorString << item._lastTryTime << item._ignoreDuration
<< item._lastTryModtime << item._lastTryEtag;
<< item._lastTryModtime << item._lastTryEtag << item._renameTarget ;
_setErrorBlacklistQuery->reset_and_clear_bindings();
}
+1
Ver Arquivo
@@ -151,6 +151,7 @@ SyncJournalErrorBlacklistRecord SyncJournalErrorBlacklistRecord::update(
// The factor of 5 feels natural: 25s, 2 min, 10 min, ~1h, ~5h, ~24h
entry._ignoreDuration = old._ignoreDuration * 5;
entry._file = item._file;
entry._renameTarget = item._renameTarget;
if( item._httpErrorCode == 403 ) {
qDebug() << "Probably firewall error: " << item._httpErrorCode << ", blacklisting up to 1h only";
+1
Ver Arquivo
@@ -89,6 +89,7 @@ public:
time_t _ignoreDuration;
QString _file;
QString _renameTarget;
bool isValid() const;
+30 -7
Ver Arquivo
@@ -35,6 +35,10 @@
#else
#include <QStandardPaths>
#endif
#if QT_VERSION >= QT_VERSION_CHECK(5, 2, 0)
#include <QCollator>
#endif
#ifdef Q_OS_UNIX
#include <sys/statvfs.h>
@@ -306,17 +310,22 @@ namespace {
QString description(quint64 value) const
{
return QCoreApplication::translate(
"Utiliy", name, 0, QCoreApplication::UnicodeUTF8,
"Utility", name, 0, QCoreApplication::UnicodeUTF8,
value);
}
};
// QTBUG-3945 and issue #4855: QT_TRANSLATE_NOOP does not work with plural form because lupdate
// limitation unless we fake more arguments
// (it must be in the form ("context", "source", "comment", n)
#undef QT_TRANSLATE_NOOP
#define QT_TRANSLATE_NOOP(ctx, str, ...) str
Q_DECL_CONSTEXPR Period periods[] = {
{ QT_TRANSLATE_NOOP("Utility", "%Ln year(s)") , 365*24*3600*1000LL },
{ QT_TRANSLATE_NOOP("Utility", "%Ln month(s)") , 30*24*3600*1000LL },
{ QT_TRANSLATE_NOOP("Utility", "%Ln day(s)") , 24*3600*1000LL },
{ QT_TRANSLATE_NOOP("Utility", "%Ln hour(s)") , 3600*1000LL },
{ QT_TRANSLATE_NOOP("Utility", "%Ln minute(s)") , 60*1000LL },
{ QT_TRANSLATE_NOOP("Utility", "%Ln second(s)") , 1000LL },
{ QT_TRANSLATE_NOOP("Utility", "%n year(s)" , 0, _) , 365*24*3600*1000LL },
{ QT_TRANSLATE_NOOP("Utility", "%n month(s)", 0, _) , 30*24*3600*1000LL },
{ QT_TRANSLATE_NOOP("Utility", "%n day(s)", 0, _) , 24*3600*1000LL },
{ QT_TRANSLATE_NOOP("Utility", "%n hour(s)", 0, _) , 3600*1000LL },
{ QT_TRANSLATE_NOOP("Utility", "%n minute(s)", 0, _) , 60*1000LL },
{ QT_TRANSLATE_NOOP("Utility", "%n second(s)", 0, _ ), 1000LL },
{ 0, 0 }
};
} // anonymous namespace
@@ -541,4 +550,18 @@ quint64 Utility::StopWatch::durationOfLap( const QString& lapName ) const
return _lapTimes.value(lapName, 0);
}
void Utility::sortFilenames(QStringList& fileNames)
{
#if QT_VERSION >= QT_VERSION_CHECK(5, 2, 0)
QCollator collator;
collator.setNumericMode(true);
collator.setCaseSensitivity(Qt::CaseInsensitive);
qSort(fileNames.begin(), fileNames.end(), collator);
#elif QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
fileNames.sort(Qt::CaseInsensitive);
#else
fileNames.sort();
#endif
}
} // namespace OCC
+5
Ver Arquivo
@@ -136,6 +136,11 @@ namespace Utility
quint64 durationOfLap( const QString& lapName ) const;
};
/**
* @brief Sort a QStringList in a way that's appropriate for filenames
*/
OWNCLOUDSYNC_EXPORT void sortFilenames(QStringList& fileNames);
}
/** @} */ // \addtogroup
+1 -1
Ver Arquivo
@@ -11,7 +11,7 @@ macro(owncloud_add_test test_class additional_cpp)
string(TOLOWER "${OWNCLOUD_TEST_CLASS}" OWNCLOUD_TEST_CLASS_LOWERCASE)
add_executable(${OWNCLOUD_TEST_CLASS}Test test${OWNCLOUD_TEST_CLASS_LOWERCASE}.cpp ${additional_cpp})
qt5_use_modules(${OWNCLOUD_TEST_CLASS}Test Test Sql Xml Network Gui Widgets)
qt5_use_modules(${OWNCLOUD_TEST_CLASS}Test Test Sql Xml Network)
target_link_libraries(${OWNCLOUD_TEST_CLASS}Test
updater
+6 -1
Ver Arquivo
@@ -150,5 +150,10 @@ using namespace OCC;
}
};
QTEST_MAIN(TestChecksumValidator)
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
QTEST_MAIN(TestChecksumValidator)
#else
QTEST_GUILESS_MAIN(TestChecksumValidator)
#endif
#include "testchecksumvalidator.moc"
+1 -1
Ver Arquivo
@@ -100,5 +100,5 @@ private slots:
};
QTEST_MAIN(TestConcatUrl)
QTEST_APPLESS_MAIN(TestConcatUrl)
#include "testconcaturl.moc"
+1 -1
Ver Arquivo
@@ -85,5 +85,5 @@ private slots:
};
QTEST_MAIN(TestCSyncSqlite)
QTEST_APPLESS_MAIN(TestCSyncSqlite)
#include "testcsyncsqlite.moc"
+11 -11
Ver Arquivo
@@ -26,24 +26,24 @@ private slots:
bool excludeHidden = true;
bool keepHidden = false;
QVERIFY(!excluded.isExcluded("/a/b", "b", keepHidden));
QVERIFY(!excluded.isExcluded("/a/b~", "b~", keepHidden));
QVERIFY(!excluded.isExcluded("/a/.b", ".b", keepHidden));
QVERIFY(excluded.isExcluded("/a/.b", ".b", excludeHidden));
QVERIFY(!excluded.isExcluded("/a/b", "/a", keepHidden));
QVERIFY(!excluded.isExcluded("/a/b~", "/a", keepHidden));
QVERIFY(!excluded.isExcluded("/a/.b", "/a", keepHidden));
QVERIFY(excluded.isExcluded("/a/.b", "/a", excludeHidden));
QString path(BIN_PATH);
path.append("/sync-exclude.lst");
excluded.addExcludeFilePath(path);
excluded.reloadExcludes();
QVERIFY(!excluded.isExcluded("/a/b", "b", keepHidden));
QVERIFY(excluded.isExcluded("/a/b~", "b~", keepHidden));
QVERIFY(!excluded.isExcluded("/a/.b", ".b", keepHidden));
QVERIFY(excluded.isExcluded("/a/.Trashes", ".Trashes", keepHidden));
QVERIFY(excluded.isExcluded("/a/foo_conflict-bar", "foo_conflict-bar", keepHidden));
QVERIFY(excluded.isExcluded("/a/.b", ".b", excludeHidden));
QVERIFY(!excluded.isExcluded("/a/b", "/a", keepHidden));
QVERIFY(excluded.isExcluded("/a/b~", "/a", keepHidden));
QVERIFY(!excluded.isExcluded("/a/.b", "/a", keepHidden));
QVERIFY(excluded.isExcluded("/a/.Trashes", "/a", keepHidden));
QVERIFY(excluded.isExcluded("/a/foo_conflict-bar", "/a", keepHidden));
QVERIFY(excluded.isExcluded("/a/.b", "/a", excludeHidden));
}
};
QTEST_MAIN(TestExcludedFiles)
QTEST_APPLESS_MAIN(TestExcludedFiles)
#include "testexcludedfiles.moc"
+1 -1
Ver Arquivo
@@ -87,5 +87,5 @@ private slots:
};
QTEST_MAIN(TestFileSystem)
QTEST_APPLESS_MAIN(TestFileSystem)
#include "testfilesystem.moc"
+1 -1
Ver Arquivo
@@ -41,5 +41,5 @@ private slots:
};
QTEST_MAIN(TestFolder)
QTEST_APPLESS_MAIN(TestFolder)
#include "testfolder.moc"
+1 -1
Ver Arquivo
@@ -118,5 +118,5 @@ private slots:
}
};
QTEST_MAIN(TestFolderMan)
QTEST_APPLESS_MAIN(TestFolderMan)
#include "testfolderman.moc"
+6 -1
Ver Arquivo
@@ -170,5 +170,10 @@ private slots:
}
};
QTEST_MAIN(TestFolderWatcher)
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
QTEST_MAIN(TestFolderWatcher)
#else
QTEST_GUILESS_MAIN(TestFolderWatcher)
#endif
#include "testfolderwatcher.moc"
+1 -1
Ver Arquivo
@@ -69,5 +69,5 @@ private slots:
}
};
QTEST_MAIN(TestInotifyWatcher)
QTEST_APPLESS_MAIN(TestInotifyWatcher)
#include "testinotifywatcher.moc"
+1 -1
Ver Arquivo
@@ -72,5 +72,5 @@ private slots:
}
};
QTEST_MAIN(TestNetrcParser)
QTEST_APPLESS_MAIN(TestNetrcParser)
#include "testnetrcparser.moc"
+1 -1
Ver Arquivo
@@ -78,5 +78,5 @@ private slots:
}
};
QTEST_MAIN(TestOwncloudPropagator)
QTEST_APPLESS_MAIN(TestOwncloudPropagator)
#include "testowncloudpropagator.moc"
+1 -1
Ver Arquivo
@@ -149,5 +149,5 @@ private:
SqlDatabase _db;
};
QTEST_MAIN(TestOwnSql)
QTEST_APPLESS_MAIN(TestOwnSql)
#include "testownsql.moc"
+1 -1
Ver Arquivo
@@ -65,5 +65,5 @@ private slots:
}
};
QTEST_MAIN(TestSyncFileItem)
QTEST_APPLESS_MAIN(TestSyncFileItem)
#include "testsyncfileitem.moc"

Alguns arquivos não foram exibidos porque demasiados arquivos foram alterados neste diff Mostrar Mais