Comparar commits

...

195 Commits

Autor SHA1 Mensagem Data
Markus Goetz d891ed9d08 FolderWatcher: Act on relative paths #5116 2016-09-12 11:59:24 +02:00
Olivier Goffart 86eab48981 Qt4 Compile 2016-08-31 10:27:20 +02:00
Olivier Goffart d2bde5489f Propagator, remove the QNAM in the name as the alternative has been removed a long time ago 2016-08-31 10:25:06 +02:00
Christian Kamm 39e93768ea Account wizard: Enable back button consistently #5107
Tested with http auth and shib auth.
2016-08-26 13:12:25 +02:00
Christian Kamm c1eb9244d1 Shibboleth: Fix detection in account wizard #5138
Following redirections generally
(bb5c2cbfa5) meant that the special
shib-redirection detection code was no longer being used.
2016-08-26 12:58:06 +02:00
Markus Goetz 6ecda6e7f4 Merge branch '2.2' 2016-08-24 11:39:12 +02:00
Jenkins for ownCloud 7362575d64 [tx-robot] updated from transifex 2016-08-24 02:18:30 +02:00
Jenkins for ownCloud 6a9b6c1167 [tx-robot] updated from transifex 2016-08-23 02:18:33 +02:00
Jenkins for ownCloud 8e00fd66de [tx-robot] updated from transifex 2016-08-22 02:18:31 +02:00
Jenkins for ownCloud ef035ea7f9 [tx-robot] updated from transifex 2016-08-21 02:18:31 +02:00
Jenkins for ownCloud 77b5c5e963 [tx-robot] updated from transifex 2016-08-20 02:18:31 +02:00
Jenkins for ownCloud 687549c455 [tx-robot] updated from transifex 2016-08-19 09:58:44 +02:00
Jocelyn Turcotte b28123bed9 Fix the Qt4 unit testing build 2016-08-18 10:34:07 +02:00
Jenkins for ownCloud 677c34fbf8 [tx-robot] updated from transifex 2016-08-18 02:18:30 +02:00
Jocelyn Turcotte 2ff7b63551 Merge pull request #5122 from jturcotte/syncfilestatustrackerTests 2016-08-17 16:04:02 +02:00
Christian Kamm b541fea793 ShareLink: Ensure the password line edit is enabled #5117 2016-08-17 15:48:25 +02:00
Jocelyn Turcotte efb6b8c2c9 [overlays] Fix folders appearing as OK even though children are still syncing #4797
This would happen if the directory would first need to be created
through an mkdir propagation job. This job's itemCompleted signal
would trigger the directory to show as SYNC even though its children
are still propagating.

Fix the issue by tracking the sync count for each file, affecting
its parents. This allows us to get rid of the O(n) vector lookup
for each status query, and properly track the hierachical sync
status of a directory.

This also removes the itemCompleted signal emission from the
PropagateDirectory job. Since we only needed for overlay icons, and
since this job doesn't do any direct propagation, we can remove it
to ensure that we won't call itemCompleted twice for the item attached
to Propagate*Mkdir jobs (since the PropagateDirectory is backed by
the same SyncFileItem, instruction and status).
2016-08-17 15:40:02 +02:00
Jocelyn Turcotte e974771796 csync: Use an explicit instruction for should_update_metadata
The current way of tracking the need to update the metadata without
propagation using a separate flag makes it difficult to track
priorities between the local and remote tree. The logic is also
difficult to logically cover since the possibilities matrix isn't
100% covered, leaving the flag only used in a few situations
(mostly involving folders, but not only).

The reason we need to change this is to be able to track the sync
state of files for overlay icons. The instruction alone can't be
used since CSYNC_INSTRUCTION_SYNC is used for folders even though
they won't be propagated. Removing this logic is however not possible
without using something else than CSYNC_INSTRUCTION_NONE since too
many codepath interpret (rightfully) this as meaning "nothing to do".

This patch adds a new CSYNC_INSTRUCTION_UPDATE_METADATA instruction
to let the update and reconcile steps tell the SyncEngine to update
the metadata of a file without any propagation. Other flags are left
to be interpretted by the implementation as implicitly needing
metadata update or not, as this was already the case for most file
propagation jobs. For example, CSYNC_INSTRUCTION_NEW for directories
now also implicitly update the metadata.

Since it's not impossible for folders to emit CSYNC_INSTRUCTION_SYNC
or CSYNC_INSTRUCTION_CONFLICT, the corresponding code paths in the
sync engine have been removed.

Since the reconcile step can now know if the local tree needs metadata
update while the remote side might want propagation, the
localMetadataUpdate logic in SyncEngine::treewalkFile now simply use
a CSYNC_INSTRUCTION_UPDATE_METADATA for the local side, which is now
implemented as a different database query.
2016-08-17 15:39:31 +02:00
Jocelyn Turcotte 82ef1bcfe0 Make sure that we invalidate parents on blacklisted items
Add a missing call that we currently only do in slotItemCompleted.
This would normally only affect the first sync and would have
gotten properly update at the end of the sync anyway.
2016-08-17 15:39:30 +02:00
Jocelyn Turcotte b7ff4a76e8 Add TestSyncEngine and TestSyncFileStatusTracker auto tests
To be able to test the SyncEngine efficiently, a set of server
mocking classes have been implemented on top of QNetworkAccessManager.

The local disk side hasn't been mocked since this would require adding
a large abstraction layer in csync. The SyncEngine is instead pointed
to a different temporary dir in each test and we test by interacting
with files in this directory instead.

The FakeFolder object wraps the SyncEngine with those abstractions
and allow controlling the local files, and the fake remote state
through the FileModifier interface, using a FileInfo tree structure
for the remote-side implementation as well as feeding and comparing
the states on both side in tests.

Tests run fast and require no setup to be run, but each server feature
that we want to test on the client side needs to be implemented in
this fake objects library. For example, the OC-FileId header isn't
set as of this commit, and we can't test the file move logic properly
without implementing it first.

The TestSyncFileStatusTracker tests already contain a few QEXPECT_FAIL
for what I esteem being issues that need to be fixed in order to catch
up on our test coverage without making this patch too huge.
2016-08-17 15:39:30 +02:00
Jenkins for ownCloud 465639af82 [tx-robot] updated from transifex 2016-08-17 02:18:31 +02:00
Jenkins for ownCloud 7f59dec0bb [tx-robot] updated from transifex 2016-08-17 01:15:16 +02:00
Jenkins for ownCloud 583f9586aa [tx-robot] updated from transifex 2016-08-16 02:18:31 +02:00
Jocelyn Turcotte 2507ba9818 tx.pl: Fix each put_to_dir taking 10 seconds
The open function expects a URL, passing only the directory name would
lead HTTP::DAV to try looking it as an hostname on the network and
only return after it timed out.
2016-08-15 15:35:53 +02:00
ckamm 88cd5421bf Tray menu: Update only on demand #4990 #4985 (#5072)
The tray menu is now only updated when it becomes visible or while
it is visible.
2016-08-15 13:42:56 +02:00
ckamm 7b26e6b8f9 Progress: Don't display unlikely estimates #5046 (#5066) 2016-08-15 13:36:53 +02:00
Jenkins for ownCloud 573d942969 [tx-robot] updated from transifex 2016-08-15 02:18:30 +02:00
Jenkins for ownCloud 1a454ec6b2 [tx-robot] updated from transifex 2016-08-15 01:15:15 +02:00
Jenkins for ownCloud 02df088843 [tx-robot] updated from transifex 2016-08-14 02:18:30 +02:00
Jenkins for ownCloud ce4daaaae2 [tx-robot] updated from transifex 2016-08-13 01:15:24 +02:00
Jenkins for ownCloud cd9335e043 [tx-robot] updated from transifex 2016-08-12 02:18:30 +02:00
Jenkins for ownCloud 775ad25be3 [tx-robot] updated from transifex 2016-08-12 01:16:28 +02:00
Jenkins for ownCloud 7e43fe599c [tx-robot] updated from transifex 2016-08-12 01:15:20 +02:00
Jenkins for ownCloud 20531e57a8 [tx-robot] updated from transifex 2016-08-11 02:18:39 +02:00
Jenkins for ownCloud 3e64840e33 [tx-robot] updated from transifex 2016-08-11 01:16:34 +02:00
Jenkins for ownCloud e6db2ee960 [tx-robot] updated from transifex 2016-08-11 01:15:18 +02:00
Markus Goetz be34bfb276 issue_template.md: Clarifying comment 2016-08-10 14:44:19 +02:00
Jenkins for ownCloud e2e16aeaaa [tx-robot] updated from transifex 2016-08-10 02:18:38 +02:00
Jenkins for ownCloud 6fbeb60d86 [tx-robot] updated from transifex 2016-08-10 01:16:38 +02:00
Thomas Müller a46a69f250 [2.2] Jenkinsfile: Add win32 build (#5091) (#5115) 2016-08-09 16:20:32 +02:00
Daniel Molkentin bb5c2cbfa5 Always follow redirects in network jobs (#4905)
This is a move away from the original policy where jobs
would only follow redirects in special cases.

Two restrictions are in place:

1. We do not allow protocol downgrades (https -> http)
2. We stop redirects after we find them looping (e.g. old = new url, or
indirectly when looping 10 times).

This is closer to RFC conforming behavior, although currently
we will treat 301 replies like they were 302. This is for a separate
commit.

Error handling (and display) also needs improvement.

Addresses #2791
2016-08-09 16:01:29 +02:00
Jenkins for ownCloud 60904496d2 [tx-robot] updated from transifex 2016-08-09 15:12:31 +02:00
Thomas Müller 94c9a2cca1 Jenkinsfile: Add win32 build (#5091) 2016-08-09 15:06:17 +02:00
Jenkins for ownCloud 3187a22300 [tx-robot] updated from transifex 2016-08-09 02:18:41 +02:00
Markus Goetz 9626021a63 Update ChangeLog for 2.2.3 final 2016-08-08 15:39:49 +02:00
Jenkins for ownCloud b72a19ad64 [tx-robot] updated from transifex 2016-08-08 02:18:35 +02:00
Markus Goetz 2ae37c6beb Update ChangeLog 2016-08-07 22:51:16 +02:00
Jenkins for ownCloud f8f376ac03 [tx-robot] updated from transifex 2016-08-07 02:18:30 +02:00
Jenkins for ownCloud 632d231435 [tx-robot] updated from transifex 2016-08-06 02:18:34 +02:00
Markus Goetz fc868d89f3 Merge pull request #5108 from owncloud/limit_library_path
Limit Qt and OpenSSL Library pathes to the install directory
2016-08-05 16:39:04 +02:00
Daniel Molkentin 5a57e4a7a6 Ensure OpenSSL config file is only read from app dir 2016-08-05 16:38:08 +02:00
Jenkins for ownCloud 70a1671dc1 [tx-robot] updated from transifex 2016-08-05 14:23:25 +02:00
Daniel Molkentin 7de70516f1 Fix module loading 2016-08-05 12:35:52 +02:00
Jenkins for ownCloud 50bd4b8f4f [tx-robot] updated from transifex 2016-08-05 02:18:30 +02:00
Olivier Goffart 4a7f3cb486 SyncEngine: Fix detection of backup (#5104)
Once upon a time, the SyncEngine was instantiated once per sync. But now that
the SyncEngine is kept between sync, we need to reset all these variable between
syncs.
2016-08-04 16:06:10 +02:00
Jenkins for ownCloud b7663d00b9 [tx-robot] updated from transifex 2016-08-04 02:18:35 +02:00
Jocelyn Turcotte b307f2b65c Revert "Fix a deadlock when shutting down during discovery" (#5100)
Reverts commit 622017adcf

Could be the cause of #5092 and the cost is higher than the benefit if this is the case.
A network request taking more than 30 seconds isn't something unlikely in this world
and shouldn't be a good reason to abort. We should try to untangle the threads
dependencies to properly fix this if possible instead.
2016-08-03 16:35:24 +02:00
Jenkins for ownCloud 6c94d56b53 [tx-robot] updated from transifex 2016-08-03 02:18:37 +02:00
Olivier Goffart 73a6939b70 ownsql: handle QByteArray without converting to QString (#5097)
QByteArray is used for checksum
2016-08-02 11:39:08 +02:00
Olivier Goffart 88e5a9411a SyncEngine: Reads the data-fingerprint property (#5056)
When it changes, assume a backup was recovered, and keep conflict files.

Issues: #2325 and https://github.com/owncloud/enterprise/issues/966
2016-08-02 10:30:49 +02:00
Jenkins for ownCloud c51a80bffa [tx-robot] updated from transifex 2016-08-02 02:18:35 +02:00
Thomas Müller 87f4f70abb Merge pull request #5069 from owncloud/Jenkinsfile-2.2
[2.2] Add Jenkinsfile (#5041)
2016-08-01 12:41:04 +02:00
Olivier Goffart 19a52b9e6b Qt4: don't require a X server in the tests
Issue #5069

(cherry picked from commit 927a8b5071 and
a4310f0f5c)
2016-08-01 11:57:21 +02:00
Jenkins for ownCloud 4ea70ebd18 [tx-robot] updated from transifex 2016-08-01 02:48:18 +02:00
Jenkins for ownCloud d58c392d93 [tx-robot] updated from transifex 2016-08-01 01:16:19 +02:00
Jenkins for ownCloud b9a6970282 [tx-robot] updated from transifex 2016-07-31 02:50:05 +02:00
Jenkins for ownCloud a58ef9c586 [tx-robot] updated from transifex 2016-07-30 02:39:29 +02:00
Thomas Müller cef24da44c Add Jenkinsfile (#5041) 2016-07-29 08:48:28 +02:00
Jenkins for ownCloud 23c7f10b79 [tx-robot] updated from transifex 2016-07-29 02:18:35 +02:00
Klaas Freitag 5ac434a740 Logs: Add the name of the platform we're running on to the log. (#5082) 2016-07-28 16:30:40 +02:00
Jenkins for ownCloud 9e514d6cc7 [tx-robot] updated from transifex 2016-07-28 02:18:39 +02:00
Jenkins for ownCloud 4d109e43fa [tx-robot] updated from transifex 2016-07-27 02:18:42 +02:00
Daniel Molkentin b575ded464 More GmbH -> Inc Copyright header fixes 2016-07-26 16:53:11 +02:00
Daniel Molkentin a83c5598e8 Update owner to be ownCloud GmbH
Fixes #5079
2016-07-26 16:48:08 +02:00
Jocelyn Turcotte 03a90bf03f shell/windows: Build 43, add missing 32 bit binaries
Also include a minor change from #5025
2016-07-26 14:54:27 +02:00
Jocelyn Turcotte ff7b2381e9 shell/windows: Add missing Win32 configuration changes
The changes in build location were only done on the x64 configuration.
2016-07-26 14:53:14 +02:00
Markus Goetz 24cd8041a8 ChangeLog for 2.2.3 2016-07-26 12:14:00 +02:00
Jenkins for ownCloud 3eaadfe52f [tx-robot] updated from transifex 2016-07-26 02:43:40 +02:00
Klaas Freitag ebcec44202 ShibbolethView: Open a debug windows that shows cipher info. (#5080)
It opens a window and connects to a cipher test
page, showing the output from there, that helps for debugging.

The window is enabled by setting the environment variable
OWNCLOUD_SHIBBOLETH_DEBUG
2016-07-25 17:47:23 +02:00
Jenkins for ownCloud 7b0b7fde51 [tx-robot] updated from transifex 2016-07-25 02:18:34 +02:00
Jenkins for ownCloud fa9ec12ae7 [tx-robot] updated from transifex 2016-07-24 02:18:36 +02:00
Jenkins for ownCloud 54aa4dce46 [tx-robot] updated from transifex 2016-07-23 02:18:47 +02:00
Jenkins for ownCloud 7c19f748b7 [tx-robot] updated from transifex 2016-07-22 02:18:44 +02:00
Jenkins for ownCloud 5aa82944a4 [tx-robot] updated from transifex 2016-07-21 02:18:38 +02:00
Jenkins for ownCloud 0d9cf26890 [tx-robot] updated from transifex 2016-07-20 08:18:40 +02:00
Christian Kamm eadecc5802 Excludes: Fix a Windows specific bug #5039
It meant that almost nothing was being excluded.

Broken since 87b4693a9d
2016-07-19 15:38:57 +02:00
Christian Kamm 39bde6f3e4 Revert "Add 'open in browser' to account menu #4824"
This reverts commit 3c575a2f37.

One can already open the account in the browser by clicking the
link in the settings dialog!
2016-07-19 11:19:40 +02:00
Jenkins for ownCloud a4837e9291 [tx-robot] updated from transifex 2016-07-19 08:18:37 +02:00
Jenkins for ownCloud 5672557a84 [tx-robot] updated from transifex 2016-07-18 09:29:56 +02:00
Jenkins for ownCloud 0b31f2601d [tx-robot] updated from transifex 2016-07-18 08:18:44 +02:00
Jenkins for ownCloud a5850d4515 [tx-robot] updated from transifex 2016-07-17 08:18:34 +02:00
Jenkins for ownCloud c39eb315dd [tx-robot] updated from transifex 2016-07-16 08:18:34 +02:00
Jenkins for ownCloud 6c8e88e2ed [tx-robot] updated from transifex 2016-07-15 08:18:36 +02:00
Olivier Goffart 3465024898 CleanupPollsJob: Fix possible leak
Missing deleteLater when the CleanupPollsJob aborts.
This is only a problem if the SyncEngine is kept alive a long time. Which is
usually not the case in the configuration where poll jobs are used.
2016-07-14 09:23:22 +02:00
Jenkins for ownCloud eeea255104 [tx-robot] updated from transifex 2016-07-14 08:18:43 +02:00
Jenkins for ownCloud 8e2af57b57 [tx-robot] updated from transifex 2016-07-13 02:18:41 -04:00
Olivier Goffart 7c671756e6 Merge remote-tracking branch 'origin/2.2'
Conflicts:
	src/libsync/syncfilestatustracker.cpp
2016-07-12 17:38:15 +02:00
Olivier Goffart f3f387c36b Merge pull request #5016 from owncloud/overrideurl
AccountManager: Don't force the server URL while loading the config.
2016-07-12 14:33:28 +02:00
Olivier Goffart b53ce78eb6 Merge pull request #5025 from ArthurChiao/bugfix_#5015
fix #5015 overlay icon not show: compare folder paths with no case-se…
2016-07-12 14:32:54 +02:00
Markus Goetz 0c6788f03d conffile.rst #5052 2016-07-12 14:29:05 +02:00
ckamm bc4753e938 Sharing: Fix bug with file names containing percent encodes #5042 (#5043) 2016-07-12 14:25:33 +02:00
Thomas Müller 6bd4de19a8 Add Jenkinsfile (#5041) 2016-07-12 13:24:35 +02:00
Olivier Goffart 927a8b5071 Qt4: don't require a X server in the tests
Previous commit was not enough
2016-07-12 11:07:12 +02:00
Jenkins for ownCloud aefbca0787 [tx-robot] updated from transifex 2016-07-12 02:18:39 -04:00
Olivier Goffart a4310f0f5c Qt4: don't require a X server in the tests 2016-07-11 14:04:58 +02:00
Olivier Goffart cb64ba22b3 Fix Qt4 build 2016-07-11 12:27:59 +02:00
Jenkins for ownCloud 653b42216f [tx-robot] updated from transifex 2016-07-11 02:18:33 -04:00
Jenkins for ownCloud 3ec9cd1d9e [tx-robot] updated from transifex 2016-07-10 02:18:47 -04:00
Jenkins for ownCloud b21e3e0fdc [tx-robot] updated from transifex 2016-07-10 01:15:58 -04:00
Jenkins for ownCloud 20d0c835b6 [tx-robot] updated from transifex 2016-07-09 02:18:51 -04:00
arthurchiao 3335c733d7 be case insensitive for MacOSX, too 2016-07-08 15:53:11 +08:00
arthurchiao 4da55b69df ignore case-sensitivity only on windows 2016-07-08 15:12:37 +08:00
Jenkins for ownCloud b7085987b8 [tx-robot] updated from transifex 2016-07-08 02:18:52 -04:00
Jenkins for ownCloud a1b44cd82a [tx-robot] updated from transifex 2016-07-07 02:18:42 -04:00
ckamm 11b44358f6 Windows: Skip symlinks and junctions again #5019 (#5036)
Fixes an accidental behavior change introduced in
055c2ef73f

Affects #4056 and owncloud/enterprise#1225.
2016-07-07 08:07:19 +02:00
Jenkins for ownCloud 4979181e85 [tx-robot] updated from transifex 2016-07-07 01:15:57 -04:00
Jenkins for ownCloud 651cc25e3f [tx-robot] updated from transifex 2016-07-06 02:19:04 -04:00
Christian Kamm 699d1ba13b owncloudcmd: Make source_dir absolute #5035
Fixes a problem with relative paths on Windows.
2016-07-05 15:40:32 +02:00
Christian Kamm 3c575a2f37 Add 'open in browser' to account menu #4824 2016-07-05 14:48:51 +02:00
Christian Kamm bd7ec19644 Set discovery thread priority to low #5017 2016-07-05 13:53:57 +02:00
Daniel Molkentin a338b9f269 Merge pull request #5034 from owncloud/fix-5033
Only accept notification API Capability if endpoint is OCS-enabled
2016-07-05 12:46:20 +02:00
Jenkins for ownCloud 81ff4e02c5 [tx-robot] updated from transifex 2016-07-05 02:18:32 -04:00
Daniel Molkentin 8a1a2eb5b3 Only accept notification API Capability if endpoint is OCS-enabled
Fixes #5033
2016-07-04 18:33:02 +02:00
Jenkins for ownCloud 0c646b974f [tx-robot] updated from transifex 2016-07-04 02:18:34 -04:00
Jenkins for ownCloud e661bf2324 [tx-robot] updated from transifex 2016-07-03 02:18:29 -04:00
Jenkins for ownCloud 2abb5c95bb [tx-robot] updated from transifex 2016-07-02 02:19:18 -04:00
Jenkins for ownCloud c3ef1a996f [tx-robot] updated from transifex 2016-07-01 02:18:37 -04:00
arthurchiao 7a2a439426 fix #5015 overlay icon not show: compare folder paths with no case-sensitivity 2016-07-01 13:03:42 +08:00
Jenkins for ownCloud ce26afb262 [tx-robot] updated from transifex 2016-06-30 02:18:34 -04:00
Jenkins for ownCloud 56e1737c61 [tx-robot] updated from transifex 2016-06-29 02:18:33 -04:00
Olivier Goffart dff57362f9 AccountManager: Don't force the server URL while loading the config.
While loading the account, only override the server url if Theme::forceConfigAuthType
is set. This restore the behavior from the client 2.1 for theme that did not
use Theme::forceConfigAuthType.

Issue: owncloud/enterprise#1418
2016-06-28 14:32:03 +02:00
Olivier Goffart 3f3a679f81 Fix the URL from previous commit
The pull request was merged too early and did not contain the URL change

(Issue #4877)
2016-06-28 14:17:16 +02:00
Olivier Goffart cde9017340 GUI: Show link to the page that allow to add a new token (#4963)
If owncloud >= 9.1 is detected:
and add a link to the ownCloud page that allow to add device token.

Issue #4877
2016-06-28 12:25:04 +02:00
Jenkins for ownCloud 05a7c18635 [tx-robot] updated from transifex 2016-06-28 02:19:16 -04:00
Jocelyn Turcotte 3a77074b97 Merge pull request #5007 from owncloud/rebuildWinShellIntegration
Rebuild win shell integration
2016-06-27 18:02:42 +02:00
Jocelyn Turcotte 446e7cbd93 Fix a QAction leak (#5008)
Attach the accout menu QAction to the menu rather than the
ownCloudGui since it should be destroyed when the context
menu is cleared.
2016-06-27 16:22:51 +02:00
ckamm b4d26ba952 Fix windows HiDPI #4994 (#4998)
This was removed in 0194ebb222
because it breaks on Linux. However, it looks like it is correct
for Windows. In the meantime the surrounding ifdef has changed
from !Q_OS_MAC to Q_OS_WIN, so reverting it makes sense.
2016-06-27 16:17:58 +02:00
Jocelyn Turcotte 622017adcf Fix a deadlock when shutting down during discovery (#4993)
Since the SyncEngine now quits and waits for the discovery thread,
the main thread can enter a deadlock where the discovery thread waits
for its directory result.

Add a 2 seconds timer to the discovery thread wait condition
to limit the deadlock time.
2016-06-27 16:12:39 +02:00
Jocelyn Turcotte 088a4f0bbe binaries: Update to build 42 owncloud/client#4977 2016-06-27 15:30:03 +02:00
Jocelyn Turcotte ba96fb89a5 shell_integration/windows: Set VS output directory in the binary submodule
This allows creating a new build simply by hitting F7 in visual studio
and then committing the changed files in the binary submodules without
having to know which files to move where.
2016-06-27 15:23:37 +02:00
Jocelyn Turcotte 70ae11fcad shell_integration/windows: Add a manually-increased build number
Since this isn't yet built together with the rest, we can't reliably
use the client version without having to rebuilt the extension manually
on each release. But it would still be nice to be able to tell if a user
has the right version or not loaded, so instead just tag each update of
the DLLs with a separate release version.

This means that every time we update those binaries we'll have to manually
increment the number in the header, but worst case we'll forget from time
to time but we'll be able to know if we didn't, and know if we can rely on
the number or not.
2016-06-27 15:13:47 +02:00
ckamm 86fd982b00 SocketAPI: Use different pipe name #4977 (#4997)
Named pipe names that contain backslashes sometimes lead to problems.
2016-06-27 15:13:08 +02:00
ckamm bdb304f8ec Share: Permissions for federated shares on servers >=9.1 #4996 (#5001)
This disables the workaround 487e1fdca5ee04fc98c1ed77898df70d740967c8
for servers that are new enough to support fine grained permissions
on federated shares.

The consequence is that the 'reshare' permission is now granted by
default and that users can edit permissions on the usual fine-grained
level again.

The way the client deals with servers <9.1 is unchanged.
2016-06-27 11:09:51 +02:00
Jenkins for ownCloud 001075daf0 [tx-robot] updated from transifex 2016-06-27 02:18:35 -04:00
Jenkins for ownCloud 2a98aa7130 [tx-robot] updated from transifex 2016-06-26 02:18:40 -04:00
Jenkins for ownCloud 9904fb200e [tx-robot] updated from transifex 2016-06-25 02:18:39 -04:00
Jenkins for ownCloud 6822ae5bec [tx-robot] updated from transifex 2016-06-24 02:18:52 -04:00
Christian Kamm 440a804836 Tray: Add minimal mode as workaround and testing tool #4985 #4990 2016-06-23 10:22:43 +02:00
Jenkins for ownCloud 9b66dd7166 [tx-robot] updated from transifex 2016-06-23 02:18:31 -04:00
Christian Kamm 7601783553 Fix Qt4 build 2016-06-22 15:47:33 +02:00
Christian Kamm 6e9df8673f Merge remote-tracking branch 'origin/2.2' 2016-06-22 15:41:37 +02:00
Christian Kamm c0b0bd5b63 owncloudcmd: Fix --exclude regression
It's ok if the system exclude file is missing when --exclude is
specified explicitly.
2016-06-22 15:30:20 +02:00
Jenkins for ownCloud 28d86cee17 [tx-robot] updated from transifex 2016-06-22 02:18:48 -04:00
ckamm 32bb8295a2 csync: Use the full file stat destructors (#4992)
* For csync_file_stat_t and csync_vio_file_stat_t
* Add original_name to the vio file stat destructor
2016-06-21 12:06:21 +02:00
Jocelyn Turcotte 5d71ad83ec Fix the Qt4 build
QSharedPointer::reset doesn't exist in Qt4.
2016-06-21 12:04:26 +02:00
Markus Goetz ab24980001 Merge pull request #4979 from jturcotte/2.2
Memory improvements during propagation
2016-06-21 10:00:41 +02:00
ckamm 07dea72c37 Setup csync logging earlier (#4991)
We were missing some csync related log output during startup.

Discovered in #4967
2016-06-21 09:58:53 +02:00
Jenkins for ownCloud a734be347b [tx-robot] updated from transifex 2016-06-21 02:18:36 -04:00
Daniel Molkentin 1443ddc7c9 This branch is headed towards 2.2.3 now 2016-06-20 17:42:19 +02:00
Klaas Freitag 191177ff22 excludes: Only log if the pattern was really logged. (#4989) 2016-06-20 15:50:20 +02:00
ckamm 43a2aec92b Performance: Don't redundantly add the same exclude files #4967 (#4988)
Excludes: Don't redundantly add the same exclude files #4967, Never accept duplicate exclude patterns #4967
2016-06-20 15:14:13 +02:00
ckamm 681243277e Share dialog: Add 'Mail link' button #3261 (#4961) 2016-06-20 13:06:57 +02:00
Jenkins for ownCloud c848097c6b [tx-robot] updated from transifex 2016-06-20 02:18:29 -04:00
Jenkins for ownCloud 096e2cf233 [tx-robot] updated from transifex 2016-06-19 02:18:34 -04:00
Jenkins for ownCloud 7181aedb4b [tx-robot] updated from transifex 2016-06-18 02:18:33 -04:00
Jocelyn Turcotte edfd75949d Reduce the memory usage of the StopWatch during propagation
Use a QMap to avoid using a full hashtable for only a few entries, and
clear the QMap once we're done with the measuring. This saves a few
hundred bytes per job during propagation that would otherwise only be
freed at the end of the sync.
2016-06-17 19:20:53 +02:00
Jocelyn Turcotte 7fb134b4e0 Delete the ComputeChecksum object when the job is finished
Each object takes almost 1k and we don't need it once the propagation is
done.
2016-06-17 19:20:53 +02:00
Jocelyn Turcotte 87e3553c85 Prevent the sync protocol widget from over-using memory
During propagation, we create a line for each file, taking memory, but
we delete all lines passed 2000 right at the beginning of the next sync.
Since the user has little chances of being able to read past those 2000
lines in the log, we might as well keep it capped at 2000 also during
propagation to prevent it from eating memory.
2016-06-17 19:20:53 +02:00
Jocelyn Turcotte 6f3aaecb78 Fix a crash on if shutting down during propagation
The SyncRunFileLog owned by the Folder must be destroyed after the
SyncEngine since the SyncEngine will abort during destruction, resulting
in all jobs being aborted.

It's possible that this crash only happens with a debug build.
2016-06-17 19:20:52 +02:00
Markus Goetz 40e3653722 VERSION.cmake: This is 2.2.2 2016-06-17 10:31:30 +02:00
Jenkins for ownCloud 5a4f50a0ff [tx-robot] updated from transifex 2016-06-17 02:19:00 -04:00
Jocelyn Turcotte 3342ebfcc5 SocketAPI: Push new status of dirty files regardless when not synced (#4970)
The FolderWatcher inserts files to be marked as SYNC and we
currently assume that all file statuses will be updated by the
following sync. It's however possible that the FolderWatcher
notify us of a change that csync won't consider necessary to
propagate, in which case a new status wouldn't be pushed and
the file manager would continue showing this file as syncing.

Re-push the file status when emptying the dirty files list
before propagating to avoid this issue, most likely the OK
status.
2016-06-16 15:27:10 +02:00
Olivier Goffart b4900d60b7 Checksum speedup. (#4968)
No need to allocate (and initialize to 0) a 10 MiB buffer for each files, even
when most files are much smaller than that.
So make sure the buffer that we allocate is not bigger than the file size.
And Also 10 MiB is a bit big for a buffer. 500 KiB should be more than enough.
(Too big allocations can cause problem because of memory fragmentation and such)
2016-06-16 08:28:30 +02:00
Olivier Goffart 92309013da SyncEngine: make abort and closing more robust
We first need to set the abort flag to csync and then aborting the discovery
job, otherwise, the discovery thread could start a new job in the mean time.

We also need to make sure that the thread has existed before we destroy the
exclude list.
2016-06-16 08:26:33 +02:00
Jenkins for ownCloud 4895589e4d [tx-robot] updated from transifex 2016-06-16 02:18:46 -04:00
Jocelyn Turcotte cb50fae0a7 SocketAPI: Move the normalization closer to the data entrance (#4972)
Follow-up for #4884
2016-06-15 21:03:21 +02:00
Jocelyn Turcotte 05d199881e Merge pull request #4971 from owncloud/fixAccountHandleSslErrorsCrash
Attempt to fix the Account::slotHandleSslErrors crash
2016-06-15 18:53:47 +02:00
Jocelyn Turcotte 147cf798a6 Attempt to fix the Account::slotHandleSslErrors crash
Events from the crash reporter suggest that the QNAM and its
child replies might get deleted before returning from this method
and the only possible cause we can see is that the inner event
loop has something to do with it.

Try keeping a ref on the QNAM while in this method to make sure
that it won't get deleted by the inner event loop.
2016-06-15 18:12:02 +02:00
Jocelyn Turcotte d40c56eda5 Account: Use smart pointers to hold its credentials and QNAM objects
Also make sure that both use QObject::deleteLater as their delete
function.
2016-06-15 18:12:01 +02:00
Olivier Goffart 6dade0b114 PropagateUpload: fix crash in PUTFileJob::slotTimeout
Same fix as in commit 60c101d9

From the crash reporter:

Crash
EXCEPTION_ACCESS_VIOLATION_READ at 0x4
qnetworkreply.cpp in QNetworkReply::request at line 476
propagateupload.cpp in OCC::PUTFileJob::slotTimeout at line 100
moc_abstractnetworkjob.cpp in OCC::AbstractNetworkJob::qt_static_metacall at line 98
qobject.cpp in QMetaObject::activate at line 3716
moc_qtimer.cpp in QTimer::timeout at line 192
qtimer.cpp in QTimer::timerEvent at line 247
qobject.cpp in QObject::event at line 1267
qapplication.cpp in QApplicationPrivate::notify_helper at line 3722
qapplication.cpp in QApplication::notify at line 3505
qcoreapplication.cpp in QCoreApplication::notifyInternal at line 932
2016-06-15 14:32:25 +02:00
Jenkins for ownCloud 5de44407bf [tx-robot] updated from transifex 2016-06-15 02:18:44 -04:00
Jenkins for ownCloud 2df741e456 [tx-robot] updated from transifex 2016-06-14 02:18:36 -04:00
Olivier Goffart 8b5f71f49e Fix docker build instruction for windows 2016-06-13 15:30:39 +02:00
Jenkins for ownCloud 77791ccb34 [tx-robot] updated from transifex 2016-06-13 02:18:35 -04:00
Jenkins for ownCloud a6e4f9939c [tx-robot] updated from transifex 2016-06-12 02:18:35 -04:00
Jenkins for ownCloud 523cdff1cf [tx-robot] updated from transifex 2016-06-11 02:18:33 -04:00
Jenkins for ownCloud c4d6277ce3 [tx-robot] updated from transifex 2016-06-10 02:18:39 -04:00
Jenkins for ownCloud 73cc3a4fd4 [tx-robot] updated from transifex 2016-06-10 01:15:55 -04:00
Christian Kamm d655074f85 Log: Include start of propagation and lap duration 2016-06-09 14:28:15 +02:00
Christian Kamm 85a173e174 Log: Write the sync log during propagation #3108
...instead of when done with the sync. This way we get information
even if the client crashes.
2016-06-09 14:10:47 +02:00
Jenkins for ownCloud 70196eb48c [tx-robot] updated from transifex 2016-06-09 02:26:12 -04:00
Jenkins for ownCloud 9b249716a3 [tx-robot] updated from transifex 2016-06-08 02:19:30 -04:00
Jürgen Weigert a4b46db91e Merge pull request #4949 from owncloud/jnweiger-tray-patch-patch-patch
Update accountsettings.cpp fixing the tray-patch
2016-06-07 15:59:53 +02:00
Jürgen Weigert ebc44fa494 Update accountsettings.cpp 2016-06-07 14:21:50 +02:00
ckamm 355a8a0a27 Workaround for Ubuntu 16.04 tray issue #4944 (#4947) 2016-06-07 11:48:25 +02:00
163 arquivos alterados com 7692 adições e 5303 exclusões
+25 -1
Ver Arquivo
@@ -1,6 +1,30 @@
ChangeLog
=========
version 2.2.1 (release 2016-05-xx)
version 2.2.3 (release 2016-08-08)
* SyncEngine: Fix detection of backup (#5104)
* Fix bug with overriding URL in config (#5016)
* Sharing: Fix bug with file names containing percent encodes (#5042, #5043)
* Sharing: Permissions for federated shares on servers >=9.1 (#4996, #5001)
* Overlays: Fix issues with file name casing on OS X and Windows
* Windows: Skip symlinks and junctions again (#5019)
* Only accept notification API Capability if endpoint is OCS-enabled (#5034)
* Fix windows HiDPI (#4994)
* SocketAPI: Use different pipe name to avoid unusual delay (#4977)
* Tray: Add minimal mode as workaround and testing tool for Linux issues (#4985, #4990)
* owncloudcmd: Fix --exclude regression #4979
* Small memleak: Use the full file stat destructors (#4992)
* Fix small QAction memleak (#5008)
* Fix crash on shutting down during propagation (#4979)
* Decrease memory usage during sync #4979
* Setup csync logging earlier to get all log output (#4991)
* Enable Shibboleth debug view with OWNCLOUD_SHIBBOLETH_DEBUG env
version 2.2.2 (release 2016-06-21)
* Excludes: Don't redundantly add the same exclude files (memleak) (#4967, #4988)
* Excludes: Only log if the pattern was really logged. (#4989)
version 2.2.1 (release 2016-06-06)
* 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)
+58
Ver Arquivo
@@ -0,0 +1,58 @@
#!groovy
node('CLIENT') {
stage 'Checkout'
checkout scm
sh '''git submodule update --init'''
stage 'Qt4'
sh '''rm -rf build
mkdir build
cd build
cmake -DUNIT_TESTING=1 -DBUILD_WITH_QT4=ON ..
make
ctest --output-on-failure'''
stage 'Qt4 - clang'
sh '''rm -rf build
mkdir build
cd build
cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DUNIT_TESTING=1 -DBUILD_WITH_QT4=ON ..
make
ctest --output-on-failure'''
stage 'Qt5'
sh '''rm -rf build
mkdir build
cd build
cmake -DUNIT_TESTING=1 -DBUILD_WITH_QT4=OFF ..
make
ctest --output-on-failure'''
stage 'Qt5 - clang'
sh '''rm -rf build
mkdir build
cd build
cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DUNIT_TESTING=1 -DBUILD_WITH_QT4=OFF ..
make
ctest --output-on-failure'''
stage 'Win32'
def win32 = docker.image('deepdiver/docker-owncloud-client-win32:latest')
win32.pull() // make sure we have the latest available from Docker Hub
win32.inside {
sh '''
rm -rf build-win32
mkdir build-win32
cd build-win32
../admin/win/download_runtimes.sh
cmake .. -DCMAKE_TOOLCHAIN_FILE=../admin/win/Toolchain-mingw32-openSUSE.cmake -DWITH_CRASHREPORTER=ON
make -j4
make package
ctest .
'''
}
}
+2 -2
Ver Arquivo
@@ -33,11 +33,11 @@ StrCpy $UNINSTALL_MESSAGEBOX "Ez dirudi ${APPLICATION_NAME} '$INSTDIR'.$ direkto
StrCpy $UNINSTALL_ABORT "Desinstalazioak erabiltzaileak bertan behera utzi du"
StrCpy $INIT_NO_QUICK_LAUNCH "Abiarazle Bizkorreko Lasterbidea (E/E)"
StrCpy $INIT_NO_DESKTOP "Mahaigaineko Lasterbidea (dagoena berridazten du)"
StrCpy $UAC_ERROR_ELEVATE "Ezin izan da goratu, errorea:"
StrCpy $UAC_INSTALLER_REQUIRE_ADMIN "Instalatzaileak administratzaile baimenak behar ditu, saiatu berriro"
StrCpy $INIT_INSTALLER_RUNNING "Instalatzailea dagoeneko martxan da."
StrCpy $UAC_UNINSTALLER_REQUIRE_ADMIN "Desinstalatzaile honek administratzaile baimenak behar ditu, saiatu berriro"
StrCpy $UAC_ERROR_LOGON_SERVICE "Saioa hasteko zerbitzua ez dago martxan, bertan behera uzten!"
StrCpy $INIT_UNINSTALLER_RUNNING "Desinstalatzailea dagoeneko martxan da."
StrCpy $SectionGroup_Shortcuts "Lasterbideak"
StrCpy $PageReinstall_SAME_Field_1 "${APPLICATION_NAME} ${VERSION} is already installed.$\r$\nSelect the operation you want to perform and click Next to continue."
StrCpy $UAC_ERROR_ELEVATE "Unable to elevate, error:"
StrCpy $UAC_ERROR_LOGON_SERVICE "Logon service is not running, aborting!"
+1 -1
Ver Arquivo
@@ -9,7 +9,7 @@ StrCpy $PageReinstall_NEW_Field_3 "
StrCpy $PageReinstall_NEW_MUI_HEADER_TEXT_TITLE "インストール済"
StrCpy $PageReinstall_NEW_MUI_HEADER_TEXT_SUBTITLE "${APPLICATION_NAME} のインストール方法を選択する"
StrCpy $PageReinstall_OLD_Field_1 "${APPLICATION_NAME} の最新バージョンがすでにインストールされています。$\n旧バージョンのインストールはお勧めしません。旧バージョンのインストールが本当に必要な場合は、まず最新バージョンをアンインストールしてから、旧バージョンをインストールしてください。$\nオペレーションを選択し、次へをクリックする。"
StrCpy $PageReinstall_SAME_Field_1 "${APPLICATION_NAME} は、${VERSION} がにインストールされています。$\n$\n実行したい操作を選択し、次へをクリックする"
StrCpy $PageReinstall_SAME_Field_1 "${APPLICATION_NAME} は、${VERSION} がすでにインストールされています。$\n$\n実行したい操作を選択し、次へをクリックしてください"
StrCpy $PageReinstall_SAME_Field_2 "追加/再インストールコンポーネント"
StrCpy $PageReinstall_SAME_Field_3 "${APPLICATION_NAME} をアンインストール"
StrCpy $UNINSTALLER_APPDATA_TITLE "${APPLICATION_NAME} をアンインストール"
+2 -2
Ver Arquivo
@@ -1,6 +1,6 @@
# 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_MESSAGEBOX_TEXT "Encontrados ${APPLICATION_EXECUTABLE} processo(s) em execução que precisa(m) de ser interrompido(s).$\nDeseja que o instalador o(s) termine por si?"
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."
@@ -20,7 +20,7 @@ StrCpy $OPTION_SECTION_SC_SHELL_EXT_DetailPrint "A instalar integração para Wi
StrCpy $OPTION_SECTION_SC_START_MENU_SECTION "Atalho do progama no Menu Inicial"
StrCpy $OPTION_SECTION_SC_START_MENU_DetailPrint "A adicionar o atalho de ${APPLICATION_NAME} ao Menu Inicial."
StrCpy $OPTION_SECTION_SC_DESKTOP_SECTION "Atalho da área de trabalho"
StrCpy $OPTION_SECTION_SC_DESKTOP_DetailPrint "A criar atalhos da área de trabalho"
StrCpy $OPTION_SECTION_SC_DESKTOP_DetailPrint "A criar atalhos na área de trabalho"
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}."
+2 -2
Ver Arquivo
@@ -9,6 +9,7 @@ StrCpy $PageReinstall_NEW_Field_3 "Neodin
StrCpy $PageReinstall_NEW_MUI_HEADER_TEXT_TITLE "Už je nainštalovaný"
StrCpy $PageReinstall_NEW_MUI_HEADER_TEXT_SUBTITLE "Vyberte si, ako chcete nainštalova ${APPLICATION_NAME}."
StrCpy $PageReinstall_OLD_Field_1 "Novšia verzia ${APPLICATION_NAME} je už nainštalovaná! Neodporúèam vám nainštalova staršiu verziu. Ak naozaj chcete nainštalova túto staršiu verziu, je lepšie najprv odinštalova aktuálnu verziu. Vyberte operáciu, ktorú chcete vykona, a kliknite na tlaèidlo Ïalej pre pokraèovanie."
StrCpy $PageReinstall_SAME_Field_1 "${APPLICATION_NAME} ${VERSION} je už nainštalovaná.$\n$\nVyberte operáciu, ktorú chcete vykona, a kliknite na tlaèidlo Ïalej pre pokraèovanie."
StrCpy $PageReinstall_SAME_Field_2 "Prida/Preinštalova komponenty"
StrCpy $PageReinstall_SAME_Field_3 "Odinštalova ${APPLICATION_NAME}"
StrCpy $UNINSTALLER_APPDATA_TITLE "Odinštalova ${APPLICATION_NAME}"
@@ -37,7 +38,6 @@ StrCpy $UAC_ERROR_ELEVATE "Nemo
StrCpy $UAC_INSTALLER_REQUIRE_ADMIN "Tento inštalátor vyžaduje admin prístup, skúste to znova"
StrCpy $INIT_INSTALLER_RUNNING "Inštalátor je už spustený."
StrCpy $UAC_UNINSTALLER_REQUIRE_ADMIN "Tento odinštalátor vyžaduje admin prístup, skúste to znova"
StrCpy $UAC_ERROR_LOGON_SERVICE "Prihlasovacia služba nebeží! Prerušuje sa."
StrCpy $INIT_UNINSTALLER_RUNNING "Odinštalátor je už spustený."
StrCpy $SectionGroup_Shortcuts "Zástupcovia"
StrCpy $PageReinstall_SAME_Field_1 "${APPLICATION_NAME} ${VERSION} is already installed.$\r$\nSelect the operation you want to perform and click Next to continue."
StrCpy $UAC_ERROR_LOGON_SERVICE "Logon service is not running, aborting!"
+1 -1
Ver Arquivo
@@ -2,7 +2,7 @@
StrCpy $MUI_FINISHPAGE_SHOWREADME_TEXT_STRING "Mostrar las notas de la versión"
StrCpy $ConfirmEndProcess_MESSAGEBOX_TEXT "El/los proceso/s ${APPLICATION_EXECUTABLE} debe/n ser detenidos.$\n¿Quiere que el instalador lo haga por usted?"
StrCpy $ConfirmEndProcess_KILLING_PROCESSES_TEXT "Deteniendo el/los proceso/s ${APPLICATION_EXECUTABLE}."
StrCpy $ConfirmEndProcess_KILL_NOT_FOUND_TEXT "¡Proceso para detener no encontrado!"
StrCpy $ConfirmEndProcess_KILL_NOT_FOUND_TEXT "¡Proceso para finalizar no encontrado!"
StrCpy $PageReinstall_NEW_Field_1 "Una versión anterior de ${APPLICATION_NAME} se encuentra instalada en el sistema. Se recomienda de instalar la versión actual antes de instalar la nueva. Seleccione la operacion deseada y haga click en Siguiente para continuar."
StrCpy $PageReinstall_NEW_Field_2 "Desinstalar antes de instalar"
StrCpy $PageReinstall_NEW_Field_3 "No desinstalar"
+1 -1
Ver Arquivo
@@ -1,5 +1,5 @@
# Auto-generated - do not modify
StrCpy $MUI_FINISHPAGE_SHOWREADME_TEXT_STRING "แสดงบันทึกประจำรุ่น"
StrCpy $MUI_FINISHPAGE_SHOWREADME_TEXT_STRING "แสดงบันทึกที่มี"
StrCpy $ConfirmEndProcess_MESSAGEBOX_TEXT "พบว่ากระบวนการ ${APPLICATION_EXECUTABLE} จะต้องหยุดทำงาน$\nคุณต้องการติดตั้งเพื่อหยุดการทำงานเหล่านี้ของคุณ?"
StrCpy $ConfirmEndProcess_KILLING_PROCESSES_TEXT "ฆ่ากระบวนการทำงาน ${APPLICATION_EXECUTABLE}"
StrCpy $ConfirmEndProcess_KILL_NOT_FOUND_TEXT "ไม่พบการฆ่ากระบวนการ!"
+5 -5
Ver Arquivo
@@ -2,27 +2,27 @@
!insertmacro MUI_LANGUAGE "Swedish"
!insertmacro MUI_LANGUAGE "Estonian"
!insertmacro MUI_LANGUAGE "Turkish"
!insertmacro MUI_LANGUAGE "PortugueseBR"
!insertmacro MUI_LANGUAGE "Slovenian"
!insertmacro MUI_LANGUAGE "SpanishInternational"
!insertmacro MUI_LANGUAGE "Dutch"
!insertmacro MUI_LANGUAGE "Norwegian"
!insertmacro MUI_LANGUAGE "Hungarian"
!insertmacro MUI_LANGUAGE "Ukrainian"
!insertmacro MUI_LANGUAGE "French"
!insertmacro MUI_LANGUAGE "Norwegian"
!insertmacro MUI_LANGUAGE "Catalan"
!insertmacro MUI_LANGUAGE "Russian"
!insertmacro MUI_LANGUAGE "Thai"
!insertmacro MUI_LANGUAGE "Finnish"
!insertmacro MUI_LANGUAGE "Basque"
!insertmacro MUI_LANGUAGE "Greek"
!insertmacro MUI_LANGUAGE "SimpChinese"
!insertmacro MUI_LANGUAGE "PortugueseBR"
!insertmacro MUI_LANGUAGE "Catalan"
!insertmacro MUI_LANGUAGE "Italian"
!insertmacro MUI_LANGUAGE "Portuguese"
!insertmacro MUI_LANGUAGE "German"
!insertmacro MUI_LANGUAGE "Czech"
!insertmacro MUI_LANGUAGE "Japanese"
!insertmacro MUI_LANGUAGE "Galician"
!insertmacro MUI_LANGUAGE "Czech"
!insertmacro MUI_LANGUAGE "German"
!insertmacro MUI_LANGUAGE "Slovak"
!insertmacro MUI_LANGUAGE "Spanish"
!insertmacro MUI_LANGUAGE "Polish"
+7
Ver Arquivo
@@ -0,0 +1,7 @@
[Paths]
Prefix = .
Plugins = .
Binaries = .
Imports = .
Qml2Imports = .
LibraryExecutables = .
+1 -1
Submodule binary updated: d27d472817...0d89ac7766
+1 -1
Ver Arquivo
@@ -1,4 +1,4 @@
# (c) 2014 Copyright ownCloud, Inc.
# (c) 2014 Copyright ownCloud GmbH
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING* file.
+1 -1
Ver Arquivo
@@ -1,4 +1,4 @@
# (c) 2014 Copyright ownCloud, Inc.
# (c) 2014 Copyright ownCloud GmbH
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING* file.
+1 -1
Ver Arquivo
@@ -1,4 +1,4 @@
# (c) 2014 Copyright ownCloud, Inc.
# (c) 2014 Copyright ownCloud GmbH
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING* file.
+1 -1
Ver Arquivo
@@ -1,4 +1,4 @@
# (c) 2014 Copyright ownCloud, Inc.
# (c) 2014 Copyright ownCloud GmbH
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING* file.
+1 -1
Ver Arquivo
@@ -1,4 +1,4 @@
# (c) 2014 Copyright ownCloud, Inc.
# (c) 2014 Copyright ownCloud GmbH
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING* file.
+1 -1
Ver Arquivo
@@ -1,4 +1,4 @@
# (c) 2014 Copyright ownCloud, Inc.
# (c) 2014 Copyright ownCloud GmbH
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING* file.
+1 -1
Ver Arquivo
@@ -1,4 +1,4 @@
# (c) 2014 Copyright ownCloud, Inc.
# (c) 2014 Copyright ownCloud GmbH
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING* file.
+1 -1
Ver Arquivo
@@ -1,4 +1,4 @@
# (c) 2014 Copyright ownCloud, Inc.
# (c) 2014 Copyright ownCloud GmbH
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING* file.
+1 -1
Ver Arquivo
@@ -1,4 +1,4 @@
# (c) 2014 Copyright ownCloud, Inc.
# (c) 2014 Copyright ownCloud GmbH
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING* file.
+1 -1
Ver Arquivo
@@ -1,4 +1,4 @@
# (c) 2014 Copyright ownCloud, Inc.
# (c) 2014 Copyright ownCloud GmbH
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING* file.
+1 -1
Ver Arquivo
@@ -1,4 +1,4 @@
# (c) 2014 Copyright ownCloud, Inc.
# (c) 2014 Copyright ownCloud GmbH
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING* file.
+3
Ver Arquivo
@@ -411,6 +411,9 @@ Section "${APPLICATION_NAME}" SEC_APPLICATION
File "@CPACK_RESOURCE_FILE_LICENSE@"
;File /oname=NOTES.txt ${NSI_PATH}\RELEASE_NOTES.txt
;Qt config:
File "${NSI_PATH}\qt.conf"
;Qt stuff:
File "${QT_DLL_PATH}\Qt5Core.dll"
File "${QT_DLL_PATH}\Qt5Gui.dll"
+1 -1
Ver Arquivo
@@ -1,4 +1,4 @@
# (c) 2014 Copyright ownCloud, Inc.
# (c) 2014 Copyright ownCloud GmbH
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING* file.
+1 -1
Ver Arquivo
@@ -1,4 +1,4 @@
# (c) 2014 Copyright ownCloud, Inc.
# (c) 2014 Copyright ownCloud GmbH
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING* file.
+1 -1
Ver Arquivo
@@ -1,4 +1,4 @@
# (c) 2014 Copyright ownCloud, Inc.
# (c) 2014 Copyright ownCloud GmbH
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING* file.
+2
Ver Arquivo
@@ -23,4 +23,6 @@
#cmakedefine SYSCONFDIR "@SYSCONFDIR@"
#cmakedefine SHAREDIR "@SHAREDIR@"
#cmakedefine WITH_UNIT_TESTING 1
#endif
+2
Ver Arquivo
@@ -41,6 +41,8 @@ endif (MEM_NULL_TESTS)
add_subdirectory(src)
if (UNIT_TESTING)
set(WITH_UNIT_TESTING ON)
find_package(CMocka)
if (CMOCKA_FOUND)
include(AddCMockaTest)
-4
Ver Arquivo
@@ -62,8 +62,4 @@ if (WIN32)
check_function_exists(__mingw_asprintf HAVE___MINGW_ASPRINTF)
endif(WIN32)
if (UNIT_TESTING)
set(WITH_UNIT_TESTING ON)
endif (UNIT_TESTING)
set(CSYNC_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} CACHE INTERNAL "csync required system libraries")
-1
Ver Arquivo
@@ -387,7 +387,6 @@ static int _csync_treewalk_visitor(void *obj, void *data) {
trav.inode = cur->inode;
trav.error_status = cur->error_status;
trav.should_update_metadata = cur->should_update_metadata;
trav.has_ignored_files = cur->has_ignored_files;
trav.checksum = cur->checksum;
trav.checksumTypeId = cur->checksumTypeId;
+16 -17
Ver Arquivo
@@ -125,20 +125,22 @@ typedef enum csync_status_codes_e CSYNC_STATUS;
* the csync state of a file.
*/
enum csync_instructions_e {
CSYNC_INSTRUCTION_NONE = 0x00000000, /* Nothing to do (UPDATE|RECONCILE) */
CSYNC_INSTRUCTION_EVAL = 0x00000001, /* There was changed compared to the DB (UPDATE) */
CSYNC_INSTRUCTION_REMOVE = 0x00000002, /* The file need to be removed (RECONCILE) */
CSYNC_INSTRUCTION_RENAME = 0x00000004, /* The file need to be renamed (RECONCILE) */
CSYNC_INSTRUCTION_EVAL_RENAME= 0x00000800, /* The file is new, it is the destination of a rename (UPDATE) */
CSYNC_INSTRUCTION_NEW = 0x00000008, /* The file is new compared to the db (UPDATE) */
CSYNC_INSTRUCTION_CONFLICT = 0x00000010, /* The file need to be downloaded because it is a conflict (RECONCILE) */
CSYNC_INSTRUCTION_IGNORE = 0x00000020, /* The file is ignored (UPDATE|RECONCILE) */
CSYNC_INSTRUCTION_SYNC = 0x00000040, /* The file need to be pushed to the other remote (RECONCILE) */
CSYNC_INSTRUCTION_STAT_ERROR = 0x00000080,
CSYNC_INSTRUCTION_ERROR = 0x00000100,
CSYNC_INSTRUCTION_TYPE_CHANGE = 0x0000200, /* Like NEW, but deletes the old entity first (RECONCILE)
Used when the type of something changes from directory to file
or back. */
CSYNC_INSTRUCTION_NONE = 0x00000000, /* Nothing to do (UPDATE|RECONCILE) */
CSYNC_INSTRUCTION_EVAL = 0x00000001, /* There was changed compared to the DB (UPDATE) */
CSYNC_INSTRUCTION_REMOVE = 0x00000002, /* The file need to be removed (RECONCILE) */
CSYNC_INSTRUCTION_RENAME = 0x00000004, /* The file need to be renamed (RECONCILE) */
CSYNC_INSTRUCTION_EVAL_RENAME = 0x00000800, /* The file is new, it is the destination of a rename (UPDATE) */
CSYNC_INSTRUCTION_NEW = 0x00000008, /* The file is new compared to the db (UPDATE) */
CSYNC_INSTRUCTION_CONFLICT = 0x00000010, /* The file need to be downloaded because it is a conflict (RECONCILE) */
CSYNC_INSTRUCTION_IGNORE = 0x00000020, /* The file is ignored (UPDATE|RECONCILE) */
CSYNC_INSTRUCTION_SYNC = 0x00000040, /* The file need to be pushed to the other remote (RECONCILE) */
CSYNC_INSTRUCTION_STAT_ERROR = 0x00000080,
CSYNC_INSTRUCTION_ERROR = 0x00000100,
CSYNC_INSTRUCTION_TYPE_CHANGE = 0x00000200, /* Like NEW, but deletes the old entity first (RECONCILE)
Used when the type of something changes from directory to file
or back. */
CSYNC_INSTRUCTION_UPDATE_METADATA = 0x00000400, /* If the etag has been updated and need to be writen to the db,
but without any propagation (UPDATE|RECONCILE) */
};
enum csync_ftw_type_e {
@@ -254,9 +256,6 @@ struct csync_tree_walk_file_s {
enum csync_ftw_type_e type;
enum csync_instructions_e instruction;
/* For directories: If the etag has been updated and need to be writen on the db */
int should_update_metadata;
/* For directories: Does it have children that were ignored (hidden or ignore pattern) */
int has_ignored_files;
+18 -3
Ver Arquivo
@@ -40,10 +40,22 @@
#define CSYNC_LOG_CATEGORY_NAME "csync.exclude"
#include "csync_log.h"
#ifndef NDEBUG
#ifndef WITH_UNIT_TESTING
static
#endif
int _csync_exclude_add(c_strlist_t **inList, const char *string) {
size_t i = 0;
// We never want duplicates, so check whether the string is already
// in the list first.
if (*inList) {
for (i = 0; i < (*inList)->count; ++i) {
char *pattern = (*inList)->vector[i];
if (c_streq(pattern, string)) {
return 1;
}
}
}
return c_strlist_add_grow(inList, string);
}
@@ -139,8 +151,10 @@ int csync_exclude_load(const char *fname, c_strlist_t **list) {
buf[i] = '\0';
if (*entry != '#') {
const char *unescaped = csync_exclude_expand_escapes(entry);
CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "Adding entry: %s", unescaped);
rc = _csync_exclude_add(list, unescaped);
if( rc == 0 ) {
CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "Adding entry: %s", unescaped);
}
SAFE_FREE(unescaped);
if (rc < 0) {
goto out;
@@ -232,10 +246,11 @@ static CSYNC_EXCLUDE_TYPE _csync_excluded_common(c_strlist_t *excludes, const ch
if (blen > 1) {
if (bname[blen-1]== ' ') {
match = CSYNC_FILE_EXCLUDE_TRAILING_SPACE;
goto out;
} else if (bname[blen-1]== '.' ) {
match = CSYNC_FILE_EXCLUDE_INVALID_CHAR;
goto out;
}
goto out;
}
if (csync_is_windows_reserved_word(bname)) {
+1 -1
Ver Arquivo
@@ -34,7 +34,7 @@ enum csync_exclude_type_e {
};
typedef enum csync_exclude_type_e CSYNC_EXCLUDE_TYPE;
#ifdef NDEBUG
#ifdef WITH_UNIT_TESTING
int _csync_exclude_add(c_strlist_t **inList, const char *string);
#endif
-2
Ver Arquivo
@@ -186,8 +186,6 @@ struct csync_file_stat_s {
mode_t mode; /* u32 */
unsigned int type : 4;
unsigned int child_modified : 1;
unsigned int should_update_metadata : 1; /*specify that the etag, or the remote perm or fileid has
changed and need to be updated on the db even for INSTRUCTION_NONE */
unsigned int has_ignored_files : 1; /* specify that a directory, or child directory contains ignored files */
char *destpath; /* for renames */
+29 -30
Ver Arquivo
@@ -20,6 +20,7 @@
#include "config_csync.h"
#include <assert.h>
#include "csync_private.h"
#include "csync_reconcile.h"
#include "csync_util.h"
@@ -130,6 +131,7 @@ static int _csync_merge_algorithm_visitor(void *obj, void *data) {
break;
/* file has been removed on the opposite replica */
case CSYNC_INSTRUCTION_NONE:
case CSYNC_INSTRUCTION_UPDATE_METADATA:
if (cur->has_ignored_files) {
/* Do not remove a directory that has ignored files */
break;
@@ -181,13 +183,8 @@ static int _csync_merge_algorithm_visitor(void *obj, void *data) {
if(!other) {
cur->instruction = CSYNC_INSTRUCTION_NEW;
if (cur->type == CSYNC_FTW_TYPE_DIR) {
// For new directories we always want to update the etag once
// the directory has been propagated. Otherwise the directory
// could appear locally without being added to the database.
cur->should_update_metadata = true;
}
} else if (other->instruction == CSYNC_INSTRUCTION_NONE
|| other->instruction == CSYNC_INSTRUCTION_UPDATE_METADATA
|| cur->type == CSYNC_FTW_TYPE_DIR) {
other->instruction = CSYNC_INSTRUCTION_RENAME;
other->destpath = c_strdup( cur->path );
@@ -195,7 +192,6 @@ static int _csync_merge_algorithm_visitor(void *obj, void *data) {
csync_vio_set_file_id( other->file_id, cur->file_id );
}
other->inode = cur->inode;
other->should_update_metadata = true;
cur->instruction = CSYNC_INSTRUCTION_NONE;
} else if (other->instruction == CSYNC_INSTRUCTION_REMOVE) {
other->instruction = CSYNC_INSTRUCTION_RENAME;
@@ -205,12 +201,12 @@ static int _csync_merge_algorithm_visitor(void *obj, void *data) {
csync_vio_set_file_id( other->file_id, cur->file_id );
}
other->inode = cur->inode;
other->should_update_metadata = true;
cur->instruction = CSYNC_INSTRUCTION_NONE;
} else if (other->instruction == CSYNC_INSTRUCTION_NEW) {
CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "OOOO=> NEW detected in other tree!");
cur->instruction = CSYNC_INSTRUCTION_CONFLICT;
} else {
assert(other->type != CSYNC_FTW_TYPE_DIR);
cur->instruction = CSYNC_INSTRUCTION_NONE;
other->instruction = CSYNC_INSTRUCTION_SYNC;
}
@@ -222,13 +218,19 @@ static int _csync_merge_algorithm_visitor(void *obj, void *data) {
break;
}
} else {
bool is_equal_files = false;
bool is_conflict = true;
/*
* file found on the other replica
*/
other = (csync_file_stat_t *) node->data;
switch (cur->instruction) {
case CSYNC_INSTRUCTION_UPDATE_METADATA:
if (other->instruction == CSYNC_INSTRUCTION_UPDATE_METADATA && ctx->current == LOCAL_REPLICA) {
// Remote wins, the SyncEngine will pick relevant local metadata since the remote tree is walked last.
cur->instruction = CSYNC_INSTRUCTION_NONE;
}
break;
case CSYNC_INSTRUCTION_EVAL_RENAME:
/* If the file already exist on the other side, we have a conflict.
Abort the rename and consider it is a new file. */
@@ -253,42 +255,39 @@ static int _csync_merge_algorithm_visitor(void *obj, void *data) {
case CSYNC_INSTRUCTION_EVAL:
if (other->type == CSYNC_FTW_TYPE_DIR &&
cur->type == CSYNC_FTW_TYPE_DIR) {
is_equal_files = (other->modtime == cur->modtime);
// Folders of the same path are always considered equals
is_conflict = false;
} else {
is_equal_files = ((other->size == cur->size) && (other->modtime == cur->modtime));
is_conflict = ((other->size != cur->size) || (other->modtime != cur->modtime));
// FIXME: do a binary comparision of the file here because of the following
// edge case:
// The files could still have different content, even though the mtime
// and size are the same.
}
if (is_equal_files) {
/* The files are considered equal. */
cur->instruction = CSYNC_INSTRUCTION_NONE;
if (ctx->current == REMOTE_REPLICA) {
// If the files are considered equal, only update the DB with the etag from remote
cur->instruction = is_conflict ? CSYNC_INSTRUCTION_CONFLICT : CSYNC_INSTRUCTION_UPDATE_METADATA;
other->instruction = CSYNC_INSTRUCTION_NONE;
/* update DB with new etag from remote */
if (ctx->current == LOCAL_REPLICA) {
other->should_update_metadata = true;
} else {
cur->should_update_metadata = true;
}
} else if(ctx->current == REMOTE_REPLICA) {
cur->instruction = CSYNC_INSTRUCTION_CONFLICT;
other->instruction = CSYNC_INSTRUCTION_NONE;
} else {
cur->instruction = CSYNC_INSTRUCTION_NONE;
other->instruction = CSYNC_INSTRUCTION_CONFLICT;
cur->instruction = CSYNC_INSTRUCTION_NONE;
other->instruction = is_conflict ? CSYNC_INSTRUCTION_CONFLICT : CSYNC_INSTRUCTION_UPDATE_METADATA;
}
break;
/* file on the other replica has not been modified */
case CSYNC_INSTRUCTION_NONE:
case CSYNC_INSTRUCTION_UPDATE_METADATA:
if (cur->type != other->type) {
// If the type of the entity changed, it's like NEW, but
// needs to delete the other entity first.
cur->instruction = CSYNC_INSTRUCTION_TYPE_CHANGE;
other->instruction = CSYNC_INSTRUCTION_NONE;
} else if (cur->type == CSYNC_FTW_TYPE_DIR) {
cur->instruction = CSYNC_INSTRUCTION_UPDATE_METADATA;
other->instruction = CSYNC_INSTRUCTION_NONE;
} else {
cur->instruction = CSYNC_INSTRUCTION_SYNC;
other->instruction = CSYNC_INSTRUCTION_NONE;
}
break;
case CSYNC_INSTRUCTION_IGNORE:
@@ -310,7 +309,7 @@ static int _csync_merge_algorithm_visitor(void *obj, void *data) {
if(cur->type == CSYNC_FTW_TYPE_DIR)
{
CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE,
"%-20s %s dir: %s",
"%-30s %s dir: %s",
csync_instruction_str(cur->instruction),
repo,
cur->path);
@@ -318,7 +317,7 @@ static int _csync_merge_algorithm_visitor(void *obj, void *data) {
else
{
CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE,
"%-20s %s file: %s",
"%-30s %s file: %s",
csync_instruction_str(cur->instruction),
repo,
cur->path);
@@ -329,7 +328,7 @@ static int _csync_merge_algorithm_visitor(void *obj, void *data) {
if(cur->type == CSYNC_FTW_TYPE_DIR)
{
CSYNC_LOG(CSYNC_LOG_PRIORITY_DEBUG,
"%-20s %s dir: %s",
"%-30s %s dir: %s",
csync_instruction_str(cur->instruction),
repo,
cur->path);
@@ -337,7 +336,7 @@ static int _csync_merge_algorithm_visitor(void *obj, void *data) {
else
{
CSYNC_LOG(CSYNC_LOG_PRIORITY_DEBUG,
"%-20s %s file: %s",
"%-30s %s file: %s",
csync_instruction_str(cur->instruction),
repo,
cur->path);
+2 -2
Ver Arquivo
@@ -472,7 +472,7 @@ int csync_statedb_get_below_path( CSYNC *ctx, const char *path ) {
if (excluded == CSYNC_FILE_EXCLUDE_AND_REMOVE
|| excluded == CSYNC_FILE_SILENTLY_EXCLUDED) {
SAFE_FREE(st);
csync_file_stat_free(st);
continue;
}
@@ -481,7 +481,7 @@ int csync_statedb_get_below_path( CSYNC *ctx, const char *path ) {
/* store into result list. */
if (c_rbtree_insert(ctx->remote.tree, (void *) st) < 0) {
SAFE_FREE(st);
csync_file_stat_free(st);
ctx->status_code = CSYNC_STATUS_TREE_ERROR;
break;
}
+25 -28
Ver Arquivo
@@ -269,8 +269,8 @@ static int _csync_detect_update(CSYNC *ctx, const char *file,
tmp = csync_statedb_get_stat_by_hash(ctx, h);
if(_last_db_return_error(ctx)) {
SAFE_FREE(st);
SAFE_FREE(tmp);
csync_file_stat_free(st);
csync_file_stat_free(tmp);
ctx->status_code = CSYNC_STATUS_UNSUCCESSFUL;
return -1;
}
@@ -314,8 +314,7 @@ static int _csync_detect_update(CSYNC *ctx, const char *file,
}
if (checksumIdentical) {
CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "NOTE: Checksums are identical, file did not actually change: %s", path);
st->instruction = CSYNC_INSTRUCTION_NONE;
st->should_update_metadata = true;
st->instruction = CSYNC_INSTRUCTION_UPDATE_METADATA;
goto out;
}
}
@@ -341,23 +340,24 @@ static int _csync_detect_update(CSYNC *ctx, const char *file,
CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "Reading from database: %s", path);
ctx->remote.read_from_db = true;
}
if (metadata_differ) {
/* file id or permissions has changed. Which means we need to update them in the DB. */
CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "Need to update metadata for: %s", path);
st->should_update_metadata = true;
}
/* If it was remembered in the db that the remote dir has ignored files, store
* that so that the reconciler can make advantage of.
*/
if( ctx->current == REMOTE_REPLICA ) {
st->has_ignored_files = tmp->has_ignored_files;
}
st->instruction = CSYNC_INSTRUCTION_NONE;
if (metadata_differ) {
/* file id or permissions has changed. Which means we need to update them in the DB. */
CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "Need to update metadata for: %s", path);
st->instruction = CSYNC_INSTRUCTION_UPDATE_METADATA;
} else {
st->instruction = CSYNC_INSTRUCTION_NONE;
}
} else {
enum csync_vio_file_type_e tmp_vio_type = CSYNC_VIO_FILE_TYPE_UNKNOWN;
/* tmp might point to malloc mem, so free it here before reusing tmp */
SAFE_FREE(tmp);
csync_file_stat_free(tmp);
/* check if it's a file and has been renamed */
if (ctx->current == LOCAL_REPLICA) {
@@ -366,7 +366,7 @@ static int _csync_detect_update(CSYNC *ctx, const char *file,
tmp = csync_statedb_get_stat_by_inode(ctx, fs->inode);
if(_last_db_return_error(ctx)) {
SAFE_FREE(st);
csync_file_stat_free(st);
ctx->status_code = CSYNC_STATUS_UNSUCCESSFUL;
return -1;
}
@@ -422,7 +422,7 @@ static int _csync_detect_update(CSYNC *ctx, const char *file,
tmp = csync_statedb_get_stat_by_file_id(ctx, fs->file_id);
if(_last_db_return_error(ctx)) {
SAFE_FREE(st);
csync_file_stat_free(st);
ctx->status_code = CSYNC_STATUS_UNSUCCESSFUL;
return -1;
}
@@ -451,7 +451,7 @@ static int _csync_detect_update(CSYNC *ctx, const char *file,
if (fs->type == CSYNC_VIO_FILE_TYPE_DIRECTORY && ctx->current == REMOTE_REPLICA && ctx->callbacks.checkSelectiveSyncNewFolderHook) {
if (ctx->callbacks.checkSelectiveSyncNewFolderHook(ctx->callbacks.update_callback_userdata, path)) {
SAFE_FREE(st);
csync_file_stat_free(st);
return 1;
}
}
@@ -461,7 +461,7 @@ static int _csync_detect_update(CSYNC *ctx, const char *file,
}
} else {
CSYNC_LOG(CSYNC_LOG_PRIORITY_DEBUG, "Unable to open statedb" );
SAFE_FREE(st);
csync_file_stat_free(st);
ctx->status_code = CSYNC_STATUS_UNSUCCESSFUL;
return -1;
}
@@ -488,7 +488,9 @@ out:
}
}
}
if (st->instruction != CSYNC_INSTRUCTION_NONE && st->instruction != CSYNC_INSTRUCTION_IGNORE
if (st->instruction != CSYNC_INSTRUCTION_NONE
&& st->instruction != CSYNC_INSTRUCTION_IGNORE
&& st->instruction != CSYNC_INSTRUCTION_UPDATE_METADATA
&& type != CSYNC_FTW_TYPE_DIR) {
st->child_modified = 1;
}
@@ -525,14 +527,14 @@ out:
switch (ctx->current) {
case LOCAL_REPLICA:
if (c_rbtree_insert(ctx->local.tree, (void *) st) < 0) {
SAFE_FREE(st);
csync_file_stat_free(st);
ctx->status_code = CSYNC_STATUS_TREE_ERROR;
return -1;
}
break;
case REMOTE_REPLICA:
if (c_rbtree_insert(ctx->remote.tree, (void *) st) < 0) {
SAFE_FREE(st);
csync_file_stat_free(st);
ctx->status_code = CSYNC_STATUS_TREE_ERROR;
return -1;
}
@@ -877,10 +879,11 @@ int csync_ftw(CSYNC *ctx, const char *uri, csync_walker_fn fn,
if (ctx->current_fs && !ctx->current_fs->child_modified
&& ctx->current_fs->instruction == CSYNC_INSTRUCTION_EVAL) {
ctx->current_fs->instruction = CSYNC_INSTRUCTION_NONE;
if (ctx->current == REMOTE_REPLICA) {
ctx->current_fs->should_update_metadata = true;
}
if (ctx->current == REMOTE_REPLICA) {
ctx->current_fs->instruction = CSYNC_INSTRUCTION_UPDATE_METADATA;
} else {
ctx->current_fs->instruction = CSYNC_INSTRUCTION_NONE;
}
}
if (ctx->current_fs && previous_fs && ctx->current_fs->has_ignored_files) {
@@ -894,12 +897,6 @@ int csync_ftw(CSYNC *ctx, const char *uri, csync_walker_fn fn,
previous_fs->child_modified = ctx->current_fs->child_modified;
}
if (flag == CSYNC_FTW_FLAG_DIR && ctx->current_fs
&& (ctx->current_fs->instruction == CSYNC_INSTRUCTION_EVAL ||
ctx->current_fs->instruction == CSYNC_INSTRUCTION_NEW)) {
ctx->current_fs->should_update_metadata = true;
}
ctx->current_fs = previous_fs;
ctx->remote.read_from_db = read_from_db;
SAFE_FREE(filename);
+1
Ver Arquivo
@@ -56,6 +56,7 @@ static const _instr_code_struct _instr[] =
{ "INSTRUCTION_STAT_ERR", CSYNC_INSTRUCTION_STAT_ERROR },
{ "INSTRUCTION_ERROR", CSYNC_INSTRUCTION_ERROR },
{ "INSTRUCTION_TYPE_CHANGE", CSYNC_INSTRUCTION_TYPE_CHANGE },
{ "INSTRUCTION_UPDATE_METADATA", CSYNC_INSTRUCTION_UPDATE_METADATA },
{ NULL, CSYNC_INSTRUCTION_ERROR }
};
+1
Ver Arquivo
@@ -56,6 +56,7 @@ void csync_vio_file_stat_destroy(csync_vio_file_stat_t *file_stat) {
SAFE_FREE(file_stat->directDownloadUrl);
SAFE_FREE(file_stat->directDownloadCookies);
SAFE_FREE(file_stat->name);
SAFE_FREE(file_stat->original_name);
SAFE_FREE(file_stat);
}
+1 -1
Ver Arquivo
@@ -141,7 +141,7 @@ csync_vio_file_stat_t *csync_vio_local_readdir(csync_vio_handle_t *dhandle) {
return file_stat;
err:
SAFE_FREE(file_stat);
csync_vio_file_stat_destroy(file_stat);
return NULL;
}
+13 -10
Ver Arquivo
@@ -167,16 +167,20 @@ csync_vio_file_stat_t *csync_vio_local_readdir(csync_vio_handle_t *dhandle) {
}
file_stat->name = c_utf8_from_locale(handle->ffd.cFileName);
file_stat->flags = CSYNC_VIO_FILE_FLAGS_NONE;
file_stat->fields |= CSYNC_VIO_FILE_STAT_FIELDS_TYPE;
if ( (handle->ffd.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT)
&& (handle->ffd.dwReserved0 & IO_REPARSE_TAG_SYMLINK)
// The SIS or DEDUP flag points to a MS deduplication feature of
// certain file storage products. It is not a normal symlink
// that should be ignored.
&& (! (handle->ffd.dwReserved0 & IO_REPARSE_TAG_SIS))
&& (! (handle->ffd.dwReserved0 & IO_REPARSE_TAG_DEDUP)) ) {
file_stat->flags = CSYNC_VIO_FILE_FLAGS_SYMLINK;
file_stat->type = CSYNC_VIO_FILE_TYPE_SYMBOLIC_LINK;
if (handle->ffd.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) {
// Detect symlinks, and treat junctions as symlinks too.
if (handle->ffd.dwReserved0 == IO_REPARSE_TAG_SYMLINK
|| handle->ffd.dwReserved0 == IO_REPARSE_TAG_MOUNT_POINT) {
file_stat->flags |= CSYNC_VIO_FILE_FLAGS_SYMLINK;
file_stat->type = CSYNC_VIO_FILE_TYPE_SYMBOLIC_LINK;
} else {
// The SIS and DEDUP reparse points should be treated as
// regular files. We don't know about the other ones yet,
// but will also treat them normally for now.
file_stat->type = CSYNC_VIO_FILE_TYPE_REGULAR;
}
} else if (handle->ffd.dwFileAttributes & FILE_ATTRIBUTE_DEVICE
|| handle->ffd.dwFileAttributes & FILE_ATTRIBUTE_OFFLINE
|| handle->ffd.dwFileAttributes & FILE_ATTRIBUTE_TEMPORARY) {
@@ -187,7 +191,6 @@ csync_vio_file_stat_t *csync_vio_local_readdir(csync_vio_handle_t *dhandle) {
file_stat->type = CSYNC_VIO_FILE_TYPE_REGULAR;
}
file_stat->flags = CSYNC_VIO_FILE_FLAGS_NONE;
/* Check for the hidden flag */
if( handle->ffd.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN ) {
file_stat->flags |= CSYNC_VIO_FILE_FLAGS_HIDDEN;
+17 -2
Ver Arquivo
@@ -178,6 +178,20 @@ static void check_csync_excluded(void **state)
rc = csync_excluded_no_ctx(csync->excludes, "latex/songbook/my_manuscript.tex.tmp", CSYNC_FTW_TYPE_FILE);
assert_int_equal(rc, CSYNC_FILE_EXCLUDE_LIST);
#ifdef _WIN32
rc = csync_excluded_no_ctx(csync->excludes, "file_trailing_space ", CSYNC_FTW_TYPE_FILE);
assert_int_equal(rc, CSYNC_FILE_EXCLUDE_TRAILING_SPACE);
rc = csync_excluded_no_ctx(csync->excludes, "file_trailing_dot.", CSYNC_FTW_TYPE_FILE);
assert_int_equal(rc, CSYNC_FILE_EXCLUDE_INVALID_CHAR);
rc = csync_excluded_no_ctx(csync->excludes, "AUX", CSYNC_FTW_TYPE_FILE);
assert_int_equal(rc, CSYNC_FILE_EXCLUDE_INVALID_CHAR);
rc = csync_excluded_no_ctx(csync->excludes, "file_invalid_char<", CSYNC_FTW_TYPE_FILE);
assert_int_equal(rc, CSYNC_FILE_EXCLUDE_INVALID_CHAR);
#endif
}
static void check_csync_excluded_traversal(void **state)
@@ -304,13 +318,14 @@ static void check_csync_excluded_performance(void **state)
const int N = 10000;
int totalRc = 0;
int i = 0;
// Being able to use QElapsedTimer for measurement would be nice...
{
struct timeval before, after;
gettimeofday(&before, 0);
for (int i = 0; i < N; ++i) {
for (i = 0; i < N; ++i) {
totalRc += csync_excluded_no_ctx(csync->excludes, "/this/is/quite/a/long/path/with/many/components", CSYNC_FTW_TYPE_DIR);
totalRc += csync_excluded_no_ctx(csync->excludes, "/1/2/3/4/5/6/7/8/9/10/11/12/13/14/15/16/17/18/19/20/21/22/23/24/25/26/27/29", CSYNC_FTW_TYPE_FILE);
}
@@ -328,7 +343,7 @@ static void check_csync_excluded_performance(void **state)
struct timeval before, after;
gettimeofday(&before, 0);
for (int i = 0; i < N; ++i) {
for (i = 0; i < N; ++i) {
totalRc += csync_excluded_traversal(csync->excludes, "/this/is/quite/a/long/path/with/many/components", CSYNC_FTW_TYPE_DIR);
totalRc += csync_excluded_traversal(csync->excludes, "/1/2/3/4/5/6/7/8/9/10/11/12/13/14/15/16/17/18/19/20/21/22/23/24/25/26/27/29", CSYNC_FTW_TYPE_FILE);
}
+1 -1
Ver Arquivo
@@ -520,7 +520,7 @@ sub put_to_dir( $$;$ )
$targetUrl = $optionsRef->{url};
}
}
$d->open($dir);
$d->open($targetUrl . $dir);
my $filename = $file;
$filename =~ s/^.*\///;
+2 -2
Ver Arquivo
@@ -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/win/docker/build.sh $(id -u)
docker run -v "$PWD:/home/user/client" owncloud-client-win32:<version> \
/home/user/client/admin/win/docker/build.sh client/ $(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.
+1 -1
Ver Arquivo
@@ -7,7 +7,7 @@ On Microsoft Windows systems:
``%LOCALAPPDATA%\ownCloud\owncloud.cfg``
On MAC OS X systems:
``$HOME/Library/Application Support/ownCloud``
``$HOME/Library/Application Support/ownCloud/owncloud.cfg``
The configuration file contains settings using the Microsoft Windows .ini file
+11 -3
Ver Arquivo
@@ -1,3 +1,11 @@
<!---
Please try to only report a bug if it happens with the latest version
The latest version can be seen by checking the ChangeLog: https://owncloud.org/changelog/desktop/
For support try: https://central.owncloud.org/c/help/desktop-file-sync
--->
### Expected behaviour
Tell us what should happen
@@ -20,7 +28,7 @@ PHP version:
ownCloud version:
Storage backend:
Storage backend (external storage):
### Client configuration
Client version:
@@ -38,11 +46,11 @@ logs.
```Template for output < 10 lines```
1. Output of `owncloud --logwindow` or `owncloud --logfile log.txt`
1. Client logfile: 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/2.2/troubleshooting.html#client-logfile )
2. Web server error log:
3. ownCloud log (data/owncloud.log):
3. Server logfile: ownCloud log (data/owncloud.log):
+291 -8
Ver Arquivo
@@ -56,7 +56,251 @@ X-GNOME-Autostart-Delay=3
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
Comment[oc]=@APPLICATION_NAME@ sincronizacion del client
GenericName[oc]=Dorsièr de Sincronizacion
Name[oc]=@APPLICATION_NAME@ sincronizacion del client
Icon[oc]=@APPLICATION_EXECUTABLE@
Comment[ar]=@APPLICATION_NAME@ زبون مزامنة مكتبي
GenericName[ar]=مزامنة المجلد
Name[ar]=@APPLICATION_NAME@ زبون مزامنة مكتبي
Icon[ar]=@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@
@@ -70,9 +314,11 @@ GenericName[de]=Ordner-Synchronisation
Name[de]=@APPLICATION_NAME@ Desktop-Synchronisationsclient
Icon[de]=@APPLICATION_EXECUTABLE@
Comment[ja_JP]=@APPLICATION_NAME@ デスクトップ同期クライアント
GenericName[ja_JP]=フォルダ同期
GenericName[ja_JP]=フォルダ同期
Name[ja_JP]=@APPLICATION_NAME@ デスクトップ同期クライアント
Icon[ja_JP]=@APPLICATION_EXECUTABLE@
GenericName[el]=Συγχρονισμός φακέλου
Icon[el]=@APPLICATION_EXECUTABLE@
Comment[en_GB]=@APPLICATION_NAME@ desktop synchronisation client
GenericName[en_GB]=Folder Sync
Name[en_GB]=@APPLICATION_NAME@ desktop sync client
@@ -85,6 +331,10 @@ 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[pl]=@APPLICATION_NAME@ klient synchronizacji dla komputerów stacjonarnych
GenericName[pl]=Folder Synchronizacji
Name[pl]=@APPLICATION_NAME@ klient synchronizacji dla komputerów stacjonarnych
Icon[pl]=@APPLICATION_EXECUTABLE@
Comment[fr]=@APPLICATION_NAME@ synchronisation du client
GenericName[fr]=Dossier de Synchronisation
Name[fr]=@APPLICATION_NAME@ synchronisation du client
@@ -108,10 +358,18 @@ Icon[it]=@APPLICATION_EXECUTABLE@
Comment[ko]=@APPLICATION_NAME@ 데스크톱 동기화 클라이언트
GenericName[ko]=폴더 동기화
Name[ko]=@APPLICATION_NAME@ 데스크톱 동기화 클라이언트
Comment[hu_HU]=@APPLICATION_NAME@ asztali szinkronizációs kliens
GenericName[hu_HU]=Könyvtár szinkronizálás
Name[hu_HU]=@APPLICATION_NAME@ asztali szinkr. kliens
Icon[hu_HU]=@APPLICATION_EXECUTABLE@
Comment[nl]=@APPLICATION_NAME@ desktop synchronisatie client
GenericName[nl]=Mappen sync
Name[nl]=@APPLICATION_NAME@ desktop sync client
Icon[nl]=@APPLICATION_EXECUTABLE@
Comment[et_EE]=@APPLICATION_NAME@ sünkroonimise klient töölauale
GenericName[et_EE]=Kaustade sünkroonimine
Name[et_EE]=@APPLICATION_NAME@ sünkroonimise klient töölauale
Icon[et_EE]=@APPLICATION_EXECUTABLE@
Comment[bg_BG]=@APPLICATION_NAME@ клиент за десктоп синхронизация
GenericName[bg_BG]=Синхронизиране на папката
Name[bg_BG]=@APPLICATION_NAME@ клиент десктоп синхронизация
@@ -136,9 +394,17 @@ 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
Comment[fi_FI]=@APPLICATION_NAME@ työpöytäsynkronointisovellus
GenericName[fi_FI]=Kansion synkronointi
Name[fi_FI]=@APPLICATION_NAME@ työpöytäsynkronointisovellus
Icon[fi_FI]=@APPLICATION_EXECUTABLE@
Comment[sv]=@APPLICATION_NAME@ desktop synkroniseringsklient
GenericName[sv]=Mappsynk
Name[sv]=@APPLICATION_NAME@ desktop synk-klient
Icon[sv]=@APPLICATION_EXECUTABLE@
Comment[tr]=@APPLICATION_NAME@ masaüstü eşitleme istemcisi
GenericName[tr]=Dosya Eşitleme
Name[tr]=@APPLICATION_NAME@ masaüstü eşitleme istemcisi
Icon[tr]=@APPLICATION_EXECUTABLE@
Comment[uk]=Настільний клієнт синхронізації @APPLICATION_NAME@
GenericName[uk]=Синхронізація теки
@@ -153,11 +419,28 @@ 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[lt_LT]=@APPLICATION_NAME@ darbalaukio sinchronizavimo programa
GenericName[lt_LT]=Katalogo sinchnorizacija
Name[lt_LT]=@APPLICATION_NAME@ darbalaukio programa
Icon[lt_LT]=@APPLICATION_EXECUTABLE@
Comment[th_TH]=@APPLICATION_NAME@ ไคลเอนต์ประสานข้อมูลเดสก์ท็อป
GenericName[th_TH]=ประสานข้อมูลโฟลเดอร์
Name[th_TH]= @APPLICATION_NAME@ ไคลเอนต์ประสานข้อมูลเดสก์ท็อป
Icon[th_TH]=@APPLICATION_EXECUTABLE@
Comment[nb_NO]=@APPLICATION_NAME@ skrivebordssynkroniseringsklient
GenericName[nb_NO]=Mappesynkronisering
Name[nb_NO]=@APPLICATION_NAME@ skrivebordssynkroniseringsklient
Icon[nb_NO]=@APPLICATION_EXECUTABLE@
Comment[nn_NO]=@APPLICATION_NAME@ klient for å synkronisera frå skrivebord
GenericName[nn_NO]=Mappe synkronisering
Name[nn_NO]=@APPLICATION_NAME@ klient for å synkronisera frå skrivebord
Icon[nn_NO]=@APPLICATION_EXECUTABLE@
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@
Icon[km]=@APPLICATION_EXECUTABLE@
Comment[lb]=@APPLICATION_NAME@ Desktop Synchronisatioun Client
GenericName[lb]=Dossier Dync
Name[lb]=@APPLICATION_NAME@ Desktop Sync Client
Icon[lb]=@APPLICATION_EXECUTABLE@
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2015 ownCloud, Inc. All rights reserved.
* Copyright (c) 2015 ownCloud GmbH. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
@@ -12,7 +12,7 @@
*/
/**
* Copyright (c) 2014 ownCloud, Inc. All rights reserved.
* Copyright (c) 2014 ownCloud GmbH. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
Arquivo binário não exibido.
@@ -59,22 +59,22 @@
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<OutDir>$(SolutionDir)$(Configuration)\$(Platform)\</OutDir>
<OutDir>$(SolutionDir)..\..\binary\shell_integration\windows\$(Configuration)\$(Platform)\</OutDir>
<IntDir>$(Configuration)\$(Platform)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)$(Configuration)\$(Platform)\</OutDir>
<OutDir>$(SolutionDir)..\..\binary\shell_integration\windows\$(Configuration)\$(Platform)\</OutDir>
<IntDir>$(Configuration)\$(Platform)\</IntDir>
<TargetName>$(ProjectName)_x86</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<OutDir>$(SolutionDir)$(Configuration)\$(Platform)\</OutDir>
<OutDir>$(SolutionDir)..\..\binary\shell_integration\windows\$(Configuration)\$(Platform)\</OutDir>
<IntDir>$(Configuration)\$(Platform)\</IntDir>
<TargetName>$(ProjectName)_x64</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>$(SolutionDir)$(Configuration)\$(Platform)\</OutDir>
<OutDir>$(SolutionDir)..\..\binary\shell_integration\windows\$(Configuration)\$(Platform)\</OutDir>
<IntDir>$(Configuration)\$(Platform)\</IntDir>
<TargetName>$(ProjectName)_x64</TargetName>
</PropertyGroup>
@@ -89,10 +89,13 @@
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>..\$(Configuration)\$(Platform);</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories>$(OutDir)</AdditionalLibraryDirectories>
<AdditionalDependencies>OCUtil_x86.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>OCContextMenu.def</ModuleDefinitionFile>
</Link>
<ResourceCompile>
<AdditionalIncludeDirectories>..\OCUtil</AdditionalIncludeDirectories>
</ResourceCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
@@ -108,14 +111,17 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalLibraryDirectories>..\$(Configuration)\$(Platform);</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories>$(OutDir)</AdditionalLibraryDirectories>
<AdditionalDependencies>OCUtil_x86.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>OCContextMenu.def</ModuleDefinitionFile>
</Link>
<ResourceCompile>
<AdditionalIncludeDirectories>..\OCUtil</AdditionalIncludeDirectories>
</ResourceCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Link>
<AdditionalLibraryDirectories>..\$(Configuration)\$(Platform);</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories>$(OutDir)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>OCContextMenu.def</ModuleDefinitionFile>
<AdditionalDependencies>OCUtil_x64.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
@@ -127,6 +133,9 @@
<Optimization>Disabled</Optimization>
<PrecompiledHeader />
</ClCompile>
<ResourceCompile>
<AdditionalIncludeDirectories>..\OCUtil</AdditionalIncludeDirectories>
</ResourceCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
@@ -134,12 +143,15 @@
<PreprocessorDefinitions>NDEBUG;_USING_V110_SDK71_;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<AdditionalLibraryDirectories>..\$(Configuration)\$(Platform);</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories>$(OutDir)</AdditionalLibraryDirectories>
<AdditionalDependencies>OCUtil_x64.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>OCContextMenu.def</ModuleDefinitionFile>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
<ResourceCompile>
<AdditionalIncludeDirectories>..\OCUtil</AdditionalIncludeDirectories>
</ResourceCompile>
</ItemDefinitionGroup>
<ItemGroup>
<Text Include="ReadMe.txt" />
@@ -110,17 +110,17 @@ IFACEMETHODIMP OCOverlay::GetPriority(int *pPriority)
// we order this in terms of likelyhood
switch (_state) {
case State_OK:
*pPriority = 0;
*pPriority = 0; break;
case State_OKShared:
*pPriority = 1;
*pPriority = 1; break;
case State_Warning:
*pPriority = 2;
*pPriority = 2; break;
case State_Sync:
*pPriority = 3;
*pPriority = 3; break;
case State_Error:
*pPriority = 4;
*pPriority = 4; break;
default:
*pPriority = 5;
*pPriority = 5; break;
}
return S_OK;
Arquivo binário não exibido.
@@ -66,25 +66,25 @@
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>$(SolutionDir)$(Configuration)\$(Platform)\</OutDir>
<OutDir>$(SolutionDir)..\..\binary\shell_integration\windows\$(Configuration)\$(Platform)\</OutDir>
<IntDir>$(Configuration)\$(Platform)\</IntDir>
<TargetName>$(ProjectName)_x86</TargetName>
<TargetExt>.dll</TargetExt>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<OutDir>$(SolutionDir)$(Configuration)\$(Platform)\</OutDir>
<OutDir>$(SolutionDir)..\..\binary\shell_integration\windows\$(Configuration)\$(Platform)\</OutDir>
<IntDir>$(Configuration)\$(Platform)\</IntDir>
<TargetName>$(ProjectName)_x64</TargetName>
<TargetExt>.dll</TargetExt>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>$(SolutionDir)$(Configuration)\$(Platform)\</OutDir>
<OutDir>$(SolutionDir)..\..\binary\shell_integration\windows\$(Configuration)\$(Platform)\</OutDir>
<IntDir>$(Configuration)\$(Platform)\</IntDir>
<TargetName>$(ProjectName)_x86</TargetName>
<TargetExt>.dll</TargetExt>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>$(SolutionDir)$(Configuration)\$(Platform)\</OutDir>
<OutDir>$(SolutionDir)..\..\binary\shell_integration\windows\$(Configuration)\$(Platform)\</OutDir>
<IntDir>$(Configuration)\$(Platform)\</IntDir>
<TargetName>$(ProjectName)_x64</TargetName>
<TargetExt>.dll</TargetExt>
@@ -99,11 +99,14 @@
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>..\$(Configuration)\$(Platform);</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories>$(OutDir)</AdditionalLibraryDirectories>
<AdditionalDependencies>OCUtil_x86.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>OCOverlays.def</ModuleDefinitionFile>
<SubSystem>Windows</SubSystem>
</Link>
<ResourceCompile>
<AdditionalIncludeDirectories>..\OCUtil</AdditionalIncludeDirectories>
</ResourceCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
@@ -114,11 +117,14 @@
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>..\$(Configuration)\$(Platform);</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories>$(OutDir)</AdditionalLibraryDirectories>
<AdditionalDependencies>OCUtil_x64.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>OCOverlays.def</ModuleDefinitionFile>
<SubSystem>Windows</SubSystem>
</Link>
<ResourceCompile>
<AdditionalIncludeDirectories>..\OCUtil</AdditionalIncludeDirectories>
</ResourceCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
@@ -133,11 +139,14 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalLibraryDirectories>..\$(Configuration)\$(Platform);</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories>$(OutDir)</AdditionalLibraryDirectories>
<AdditionalDependencies>OCUtil_x86.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>OCOverlays.def</ModuleDefinitionFile>
<SubSystem>Windows</SubSystem>
</Link>
<ResourceCompile>
<AdditionalIncludeDirectories>..\OCUtil</AdditionalIncludeDirectories>
</ResourceCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
@@ -152,11 +161,14 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalLibraryDirectories>..\$(Configuration)\$(Platform);</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories>$(OutDir)</AdditionalLibraryDirectories>
<AdditionalDependencies>OCUtil_x64.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>OCOverlays.def</ModuleDefinitionFile>
<SubSystem>Windows</SubSystem>
</Link>
<ResourceCompile>
<AdditionalIncludeDirectories>..\OCUtil</AdditionalIncludeDirectories>
</ResourceCompile>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="DllMain.cpp" />
@@ -45,7 +45,7 @@ std::wstring getUserName() {
std::wstring CommunicationSocket::DefaultPipePath()
{
auto pipename = std::wstring(L"\\\\.\\pipe\\");
pipename += L"ownCloud\\";
pipename += L"ownCloud-";
pipename += getUserName();
return pipename;
}
+5 -4
Ver Arquivo
@@ -67,26 +67,26 @@
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<TargetExt>.dll</TargetExt>
<OutDir>$(SolutionDir)$(Configuration)\$(Platform)\</OutDir>
<OutDir>$(SolutionDir)..\..\binary\shell_integration\windows\$(Configuration)\$(Platform)\</OutDir>
<IntDir>$(Configuration)\$(Platform)\</IntDir>
<TargetName>$(ProjectName)_x86</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<TargetExt>.dll</TargetExt>
<OutDir>$(SolutionDir)$(Configuration)\$(Platform)\</OutDir>
<OutDir>$(SolutionDir)..\..\binary\shell_integration\windows\$(Configuration)\$(Platform)\</OutDir>
<IntDir>$(Configuration)\$(Platform)\</IntDir>
<TargetName>$(ProjectName)_x64</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<TargetName>$(ProjectName)_x64</TargetName>
<IntDir>$(Configuration)\$(Platform)\</IntDir>
<OutDir>$(SolutionDir)$(Configuration)\$(Platform)\</OutDir>
<OutDir>$(SolutionDir)..\..\binary\shell_integration\windows\$(Configuration)\$(Platform)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<TargetExt>.dll</TargetExt>
<TargetName>$(ProjectName)_x86</TargetName>
<IntDir>$(Configuration)\$(Platform)\</IntDir>
<OutDir>$(SolutionDir)$(Configuration)\$(Platform)\</OutDir>
<OutDir>$(SolutionDir)..\..\binary\shell_integration\windows\$(Configuration)\$(Platform)\</OutDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
@@ -155,6 +155,7 @@
<ClInclude Include="CommunicationSocket.h" />
<ClInclude Include="FileUtil.h" />
<ClInclude Include="RegistryUtil.h" />
<ClInclude Include="Version.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="CommunicationSocket.cpp" />
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2014 ownCloud, Inc. All rights reserved.
* Copyright (c) 2014 ownCloud GmbH. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2014 ownCloud, Inc. All rights reserved.
* Copyright (c) 2014 ownCloud GmbH. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
+1 -1
Ver Arquivo
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2014 ownCloud, Inc. All rights reserved.
* Copyright (c) 2014 ownCloud GmbH. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
+1 -1
Ver Arquivo
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2014 ownCloud, Inc. All rights reserved.
* Copyright (c) 2014 ownCloud GmbH. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
+11
Ver Arquivo
@@ -0,0 +1,11 @@
#pragma once
// This is the number that will end up in the version window of the DLLs.
// Increment this version before committing a new build if you are today's shell_integration build master.
#define OCEXT_BUILD_NUM 43
#define STRINGIZE2(s) #s
#define STRINGIZE(s) STRINGIZE2(s)
#define OCEXT_VERSION 1,0,0,OCEXT_BUILD_NUM
#define OCEXT_VERSION_STRING STRINGIZE(OCEXT_VERSION)
+24 -4
Ver Arquivo
@@ -18,6 +18,7 @@
#include <QStringList>
#include <QUrl>
#include <QFile>
#include <QFileInfo>
#include <qdebug.h>
#include "account.h"
@@ -196,10 +197,12 @@ void parseOptions( const QStringList& app_args, CmdOptions *options )
if (!options->source_dir.endsWith('/')) {
options->source_dir.append('/');
}
if( !QFile::exists( options->source_dir )) {
QFileInfo fi(options->source_dir);
if( !fi.exists() ) {
std::cerr << "Source dir '" << qPrintable(options->source_dir) << "' does not exist." << std::endl;
exit(1);
}
options->source_dir = fi.absoluteFilePath();
QStringListIterator it(args);
// skip file name;
@@ -272,6 +275,12 @@ void selectiveSyncFixup(OCC::SyncJournalDb *journal, const QStringList &newList)
int main(int argc, char **argv) {
QCoreApplication app(argc, argv);
#ifdef Q_OS_WIN
// Ensure OpenSSL config file is only loaded from app directory
QString opensslConf = QCoreApplication::applicationDirPath()+QString("/openssl.cnf");
qputenv("OPENSSL_CONF", opensslConf.toLocal8Bit());
#endif
qsrand(QTime::currentTime().msec() * QCoreApplication::applicationPid());
CmdOptions options;
@@ -443,16 +452,27 @@ restart_sync:
QObject::connect(&engine, SIGNAL(finished(bool)), &app, SLOT(quit()));
QObject::connect(&engine, SIGNAL(transmissionProgress(ProgressInfo)), &cmd, SLOT(transmissionProgressSlot()));
// Exclude lists
engine.excludedFiles().addExcludeFilePath(ConfigFile::excludeFileFromSystem());
if( QFile::exists(options.exclude) )
bool hasUserExcludeFile = !options.exclude.isEmpty();
QString systemExcludeFile = ConfigFile::excludeFileFromSystem();
// Always try to load the user-provided exclude list if one is specified
if ( hasUserExcludeFile ) {
engine.excludedFiles().addExcludeFilePath(options.exclude);
}
// Load the system list if available, or if there's no user-provided list
if ( !hasUserExcludeFile || QFile::exists(systemExcludeFile) ) {
engine.excludedFiles().addExcludeFilePath(systemExcludeFile);
}
if (!engine.excludedFiles().reloadExcludes()) {
// Always make sure at least one list has been loaded
qFatal("Cannot load system exclude list or list supplied via --exclude");
return EXIT_FAILURE;
}
// Have to be done async, else, an error before exec() does not terminate the event loop.
QMetaObject::invokeMethod(&engine, "startSync", Qt::QueuedConnection);
+5 -7
Ver Arquivo
@@ -213,14 +213,12 @@ AccountPtr AccountManager::loadAccountHelper(QSettings& settings)
QString authType = settings.value(QLatin1String(authTypeC)).toString();
QString overrideUrl = Theme::instance()->overrideServerUrl();
if( !overrideUrl.isEmpty() ) {
// if there is a overrideUrl, don't even bother reading from the config as all the accounts
// must use the overrideUrl
QString forceAuth = Theme::instance()->forceConfigAuthType();
if(!forceAuth.isEmpty() && !overrideUrl.isEmpty() ) {
// If forceAuth is set, this might also mean the overrideURL has changed.
// See enterprise issues #1126
acc->setUrl(overrideUrl);
auto forceAuth = Theme::instance()->forceConfigAuthType();
if (!forceAuth.isEmpty()) {
authType = forceAuth;
}
authType = forceAuth;
} else {
acc->setUrl(settings.value(QLatin1String(urlC)).toUrl());
}
+7 -1
Ver Arquivo
@@ -159,7 +159,13 @@ void AccountSettings::createAccountToolbox()
void AccountSettings::slotOpenAccountWizard()
{
if (QSystemTrayIcon::isSystemTrayAvailable()) {
if (
#if QT_VERSION > QT_VERSION_CHECK(5, 0, 0)
qgetenv("QT_QPA_PLATFORMTHEME") == "appmenu-qt5" ||
// We can't call isSystemTrayAvailable with appmenu-qt5 because it breaks the systemtray
// (issue #4693, #4944)
#endif
QSystemTrayIcon::isSystemTrayAvailable()) {
topLevelWidget()->close();
}
#ifdef Q_OS_MAC
+21 -2
Ver Arquivo
@@ -105,6 +105,12 @@ Application::Application(int &argc, char **argv) :
{
_startedAt.start();
#ifdef Q_OS_WIN
// Ensure OpenSSL config file is only loaded from app directory
QString opensslConf = QCoreApplication::applicationDirPath()+QString("/openssl.cnf");
qputenv("OPENSSL_CONF", opensslConf.toLocal8Bit());
#endif
// TODO: Can't set this without breaking current config paths
// setOrganizationName(QLatin1String(APPLICATION_VENDOR));
setOrganizationDomain(QLatin1String(APPLICATION_REV_DOMAIN));
@@ -139,6 +145,7 @@ Application::Application(int &argc, char **argv) :
setupTranslations();
// Setup global excludes
qDebug() << "Loading global exclude list";
ConfigFile cfg;
ExcludedFiles& excludes = ExcludedFiles::instance();
excludes.addExcludeFilePath( cfg.excludeFile(ConfigFile::SystemScope) );
@@ -335,6 +342,14 @@ void Application::slotownCloudWizardDone( int res )
}
}
static void csyncLogCatcher(int /*verbosity*/,
const char */*function*/,
const char *buffer,
void */*userdata*/)
{
Logger::instance()->csyncLog( QString::fromUtf8(buffer) );
}
void Application::setupLogging()
{
// might be called from second instance
@@ -345,11 +360,15 @@ void Application::setupLogging()
Logger::instance()->enterNextLogFile();
qDebug() << QString::fromLatin1( "################## %1 %2 (%3) %4").arg(_theme->appName())
qDebug() << QString::fromLatin1( "################## %1 %2 (%3) %4 on %5").arg(_theme->appName())
.arg( QLocale::system().name() )
.arg(property("ui_lang").toString())
.arg(_theme->version());
.arg(_theme->version())
.arg(Utility::platformName());
// Setup CSYNC logging to forward to our own logger
csync_set_log_callback( csyncLogCatcher );
csync_set_log_level( Logger::instance()->isNoop() ? 0 : 11 );
}
void Application::slotUseMonoIconsChanged(bool)
+39 -12
Ver Arquivo
@@ -14,6 +14,7 @@
*/
#include <QInputDialog>
#include <QLabel>
#include "creds/httpcredentialsgui.h"
#include "theme.h"
#include "account.h"
@@ -31,26 +32,52 @@ void HttpCredentialsGui::askFromUser()
void HttpCredentialsGui::askFromUserAsync()
{
QString msg = tr("Please enter %1 password:\n"
"\n"
"User: %2\n"
"Account: %3\n")
.arg(Theme::instance()->appNameGUI(), _user, _account->displayName());
QString msg = tr("Please enter %1 password:<br>"
"<br>"
"User: %2<br>"
"Account: %3<br>")
.arg(Utility::escape(Theme::instance()->appNameGUI()),
Utility::escape(_user),
Utility::escape(_account->displayName()));
QString reqTxt = requestAppPasswordText(_account);
if (!reqTxt.isEmpty()) {
msg += QLatin1String("<br>") + reqTxt + QLatin1String("<br>");
}
if (!_fetchErrorString.isEmpty()) {
msg += QLatin1String("\n") + tr("Reading from keychain failed with error: '%1'").arg(
_fetchErrorString) + QLatin1String("\n");
msg += QLatin1String("<br>") + tr("Reading from keychain failed with error: '%1'").arg(
Utility::escape(_fetchErrorString)) + QLatin1String("<br>");
}
bool ok = false;
QString pwd = QInputDialog::getText(0, tr("Enter Password"), msg,
QLineEdit::Password, _previousPassword,
&ok);
QInputDialog dialog;
dialog.setWindowTitle(tr("Enter Password"));
dialog.setLabelText(msg);
dialog.setTextValue(_previousPassword);
dialog.setTextEchoMode(QLineEdit::Password);
if (QLabel *dialogLabel = dialog.findChild<QLabel *>()) {
dialogLabel->setOpenExternalLinks(true);
dialogLabel->setTextFormat(Qt::RichText);
}
bool ok = dialog.exec();
if (ok) {
_password = pwd;
_password = dialog.textValue();
_ready = true;
persist();
}
emit asked();
}
QString HttpCredentialsGui::requestAppPasswordText(const Account* account)
{
if (account->serverVersionInt() < 0x090100) {
// Older server than 9.1 does not have trhe feature to request App Password
return QString();
}
return tr("<a href=\"%1\">Click here</a> to request an app password from the web interface.")
.arg(account->url().toString() + QLatin1String("/index.php/settings/personal?section=apppasswords"));
}
} // namespace OCC
+2
Ver Arquivo
@@ -30,6 +30,8 @@ public:
HttpCredentialsGui(const QString& user, const QString& password, const QString& certificatePath, const QString& certificatePasswd) : HttpCredentials(user, password, certificatePath, certificatePasswd) {}
void askFromUser() Q_DECL_OVERRIDE;
Q_INVOKABLE void askFromUserAsync();
static QString requestAppPasswordText(const Account *account);
};
} // namespace OCC
+14 -1
Ver Arquivo
@@ -20,6 +20,7 @@
#include <QMessageBox>
#include <QNetworkReply>
#include <QSettings>
#include <QMainWindow>
#include "creds/shibboleth/shibbolethwebview.h"
#include "creds/shibbolethcredentials.h"
@@ -74,10 +75,23 @@ ShibbolethWebView::ShibbolethWebView(AccountPtr account, QWidget* parent)
connect(page->networkAccessManager()->cookieJar(),
SIGNAL(newCookiesForUrl (QList<QNetworkCookie>, QUrl)),
this, SLOT(onNewCookiesForUrl (QList<QNetworkCookie>, QUrl)));
page->mainFrame()->load(account->url());
this->setPage(page);
setWindowTitle(tr("%1 - Authenticate").arg(Theme::instance()->appNameGUI()));
// Debug view to display the cipher suite
if( !qgetenv("OWNCLOUD_SHIBBOLETH_DEBUG").isEmpty() ) {
// open an additional window to display some cipher debug info
QWebPage *debugPage = new UserAgentWebPage(this);
debugPage->mainFrame()->load( QUrl("https://cc.dcsec.uni-hannover.de/"));
QWebView *debugView = new QWebView(this);
debugView->setPage(debugPage);
QMainWindow *window = new QMainWindow(this);
window->setWindowTitle(tr("SSL Chipher Debug View"));
window->setCentralWidget(debugView);
window->show();
}
// If we have a valid cookie, it's most likely expired. We can use this as
// as a criteria to tell the user why the browser window pops up
QNetworkCookie shibCookie = ShibbolethCredentials::findShibCookie(_account.data(), ShibbolethCredentials::accountCookies(_account.data()));
@@ -142,7 +156,6 @@ void ShibbolethWebView::slotLoadFinished(bool success)
if (!success) {
qDebug() << Q_FUNC_INFO << "Could not load Shibboleth login page to log you in.";
}
}
+22 -29
Ver Arquivo
@@ -46,14 +46,6 @@
namespace OCC {
static void csyncLogCatcher(int /*verbosity*/,
const char */*function*/,
const char *buffer,
void */*userdata*/)
{
Logger::instance()->csyncLog( QString::fromUtf8(buffer) );
}
Folder::Folder(const FolderDefinition& definition,
AccountState* accountState,
@@ -70,6 +62,7 @@ Folder::Folder(const FolderDefinition& definition,
, _consecutiveFailingSyncs(0)
, _consecutiveFollowUpSyncs(0)
, _journal(definition.localPath)
, _fileLog(new SyncRunFileLog)
{
qRegisterMetaType<SyncFileItemVector>("SyncFileItemVector");
qRegisterMetaType<SyncFileItem::Direction>("SyncFileItem::Direction");
@@ -117,10 +110,14 @@ Folder::Folder(const FolderDefinition& definition,
this, SLOT(slotItemCompleted(const SyncFileItem &, const PropagatorJob &)));
connect(_engine.data(), SIGNAL(newBigFolder(QString)), this, SLOT(slotNewBigFolderDiscovered(QString)));
connect(_engine.data(), SIGNAL(seenLockedFile(QString)), FolderMan::instance(), SLOT(slotSyncOnceFileUnlocks(QString)));
connect(_engine.data(), SIGNAL(aboutToPropagate(SyncFileItemVector&)),
SLOT(slotLogPropagationStart()));
}
Folder::~Folder()
{
// Reset then engine first as it will abort and try to access members of the Folder
_engine.reset();
}
void Folder::checkLocalPath()
@@ -370,18 +367,11 @@ void Folder::bubbleUpSyncResult()
SyncFileItemPtr firstConflictItem;
SyncFileItemPtr firstItemError;
SyncRunFileLog syncFileLog;
syncFileLog.start(path(), _engine->isSyncRunning() ? _engine->stopWatch() : Utility::StopWatch() );
QElapsedTimer timer;
timer.start();
foreach (const SyncFileItemPtr &item, _syncResult.syncFileItemVector() ) {
// Log the item
syncFileLog.logItem( *item );
// and process the item to the gui
// Process the item to the gui
if( item->_status == SyncFileItem::FatalError || item->_status == SyncFileItem::NormalError ) {
//: this displays an error string (%2) for a file %1
slotSyncError( tr("%1: %2").arg(item->_file, item->_errorString) );
@@ -420,11 +410,9 @@ void Folder::bubbleUpSyncResult()
firstItemDeleted = item;
break;
case CSYNC_INSTRUCTION_SYNC:
if (!item->_isDirectory) {
updatedItems++;
if (!firstItemUpdated)
firstItemUpdated = item;
}
updatedItems++;
if (!firstItemUpdated)
firstItemUpdated = item;
break;
case CSYNC_INSTRUCTION_ERROR:
qDebug() << "Got Instruction ERROR. " << _syncResult.errorString();
@@ -446,7 +434,6 @@ void Folder::bubbleUpSyncResult()
}
}
}
syncFileLog.close();
qDebug() << "Processing result list and logging took " << timer.elapsed() << " Milliseconds.";
_syncResult.setWarnCount(ignoredItems);
@@ -634,11 +621,6 @@ void Folder::removeFromSettings() const
settings->remove(FolderMan::escapeAlias(_definition.alias));
}
bool Folder::isFileExcludedAbsolute(const QString& fullPath) const
{
return _engine->excludedFiles().isExcluded(fullPath, path(), _definition.ignoreHiddenFiles);
}
bool Folder::isFileExcludedRelative(const QString& relativePath) const
{
return _engine->excludedFiles().isExcluded(path() + relativePath, path(), _definition.ignoreHiddenFiles);
@@ -695,6 +677,10 @@ void Folder::wipe()
bool Folder::setIgnoredFiles()
{
// Note: Doing this on each sync run and on Folder construction is
// unnecessary, because _engine->excludedFiles() persists between
// sync runs. This is not a big problem because ExcludedFiles maintains
// a QSet of files to load.
ConfigFile cfg;
QString systemList = cfg.excludeFile(ConfigFile::SystemScope);
if( QFile::exists(systemList) ) {
@@ -726,8 +712,6 @@ void Folder::startSync(const QStringList &pathList)
if (proxyDirty()) {
setProxyDirty(false);
}
csync_set_log_callback( csyncLogCatcher );
csync_set_log_level( Logger::instance()->isNoop() ? 0 : 11 );
if (isBusy()) {
qCritical() << "* ERROR csync is still running and new sync requested.";
@@ -762,6 +746,8 @@ void Folder::startSync(const QStringList &pathList)
_engine->setIgnoreHiddenFiles(_definition.ignoreHiddenFiles);
_fileLog->start(path());
QMetaObject::invokeMethod(_engine.data(), "startSync", Qt::QueuedConnection);
// disable events until syncing is done
@@ -825,6 +811,7 @@ void Folder::slotSyncFinished(bool success)
} else {
qDebug() << "-> SyncEngine finished without problem.";
}
_fileLog->finish();
bubbleUpSyncResult();
bool anotherSyncNeeded = _engine->isAnotherSyncNeeded();
@@ -931,6 +918,7 @@ void Folder::slotItemCompleted(const SyncFileItem &item, const PropagatorJob& jo
// Count all error conditions.
_syncResult.setWarnCount(_syncResult.warnCount()+1);
}
_fileLog->logItem(item);
emit ProgressDispatcher::instance()->itemCompleted(alias(), item, job);
}
@@ -968,6 +956,11 @@ void Folder::slotNewBigFolderDiscovered(const QString &newF)
}
}
void Folder::slotLogPropagationStart()
{
_fileLog->logLap("Propagation starts");
}
void Folder::slotAboutToRemoveAllFiles(SyncFileItem::Direction, bool *cancel)
+5 -5
Ver Arquivo
@@ -35,6 +35,7 @@ namespace OCC {
class SyncEngine;
class AccountState;
class SyncRunFileLog;
/**
* @brief The FolderDefinition class
@@ -183,11 +184,6 @@ public:
/// Removes the folder from the account's settings.
void removeFromSettings() const;
/**
* Returns whether a file inside this folder should be excluded.
*/
bool isFileExcludedAbsolute(const QString& fullPath) const;
/**
* Returns whether a file inside this folder should be excluded.
*/
@@ -263,6 +259,8 @@ private slots:
void slotNewBigFolderDiscovered(const QString &);
void slotLogPropagationStart();
private:
bool setIgnoredFiles();
@@ -311,6 +309,8 @@ private:
SyncJournalDb _journal;
ClientProxy _clientProxy;
QScopedPointer<SyncRunFileLog> _fileLog;
};
}
+2 -1
Ver Arquivo
@@ -849,7 +849,8 @@ Folder *FolderMan::folderForPath(const QString &path)
foreach(Folder* folder, this->map().values()) {
const QString folderPath = folder->cleanPath()+QLatin1Char('/');
if(absolutePath.startsWith(folderPath)) {
if(absolutePath.startsWith(folderPath, (Utility::isWindows() || Utility::isMac())?
Qt::CaseInsensitive : Qt::CaseSensitive)) {
//qDebug() << "found folder: " << folder->path() << " for " << absolutePath;
return folder;
}
+14 -5
Ver Arquivo
@@ -934,11 +934,20 @@ void FolderStatusModel::slotSetProgress(const ProgressInfo &progress)
if (totalSize > 0) {
QString s1 = Utility::octetsToString( completedSize );
QString s2 = Utility::octetsToString( totalSize );
//: Example text: "5 minutes left, 12 MB of 345 MB, file 6 of 7"
overallSyncString = tr("%5 left, %1 of %2, file %3 of %4")
.arg(s1, s2)
.arg(currentFile).arg(totalFileCount)
.arg( Utility::durationToDescriptiveString1(progress.totalProgress().estimatedEta) );
if (progress.trustEta()) {
//: Example text: "5 minutes left, 12 MB of 345 MB, file 6 of 7"
overallSyncString = tr("%5 left, %1 of %2, file %3 of %4")
.arg(s1, s2)
.arg(currentFile).arg(totalFileCount)
.arg( Utility::durationToDescriptiveString1(progress.totalProgress().estimatedEta) );
} else {
//: Example text: "12 MB of 345 MB, file 6 of 7"
overallSyncString = tr("%1 of %2, file %3 of %4")
.arg(s1, s2)
.arg(currentFile).arg(totalFileCount);
}
} else if (totalFileCount > 0) {
// Don't attempt to estimate the time left if there is no kb to transfer.
overallSyncString = tr("file %1 of %2") .arg(currentFile).arg(totalFileCount);
+13 -4
Ver Arquivo
@@ -41,7 +41,9 @@ FolderWatcher::FolderWatcher(const QString &root, Folder* folder)
: QObject(folder),
_folder(folder)
{
_d.reset(new FolderWatcherPrivate(this, root));
_canonicalFolderPath = QFileInfo(root).canonicalFilePath();
_d.reset(new FolderWatcherPrivate(this, _canonicalFolderPath));
_timer.start();
}
@@ -55,10 +57,17 @@ bool FolderWatcher::pathIsIgnored( const QString& path )
if( !_folder ) return false;
#ifndef OWNCLOUD_TEST
if (_folder->isFileExcludedAbsolute(path)) {
qDebug() << "* Ignoring file" << path;
return true;
QString relPath = path;
if (relPath.startsWith(_canonicalFolderPath)) {
relPath = relPath.remove(0, _canonicalFolderPath.length()+1);
if (_folder->isFileExcludedRelative(relPath)) {
qDebug() << "* Ignoring file" << relPath << "in" << _canonicalFolderPath;
return true;
}
}
// there could be an odd watch event not being inside the _canonicalFolderPath
// We will just not ignore it then, who knows.
#endif
return false;
}
+1
Ver Arquivo
@@ -89,6 +89,7 @@ private:
QTime _timer;
QSet<QString> _lastPaths;
Folder* _folder;
QString _canonicalFolderPath;
friend class FolderWatcherPrivate;
};
-8
Ver Arquivo
@@ -161,12 +161,4 @@ void GeneralSettings::slotIgnoreFilesEditor()
}
}
void GeneralSettings::slotOpenAccountWizard()
{
if (QSystemTrayIcon::isSystemTrayAvailable()) {
topLevelWidget()->close();
}
OwncloudSetupWizard::runWizard(qApp, SLOT(slotownCloudWizardDone(int)), 0);
}
} // namespace OCC
-1
Ver Arquivo
@@ -44,7 +44,6 @@ private slots:
void slotToggleOptionalDesktopNotifications(bool);
void slotUpdateInfo();
void slotIgnoreFilesEditor();
void slotOpenAccountWizard();
private:
void loadMiscSettings();
+2
Ver Arquivo
@@ -58,6 +58,8 @@ int main(int argc, char **argv)
// not set this envoronment variable)
#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)
qputenv("QT_AUTO_SCREEN_SCALE_FACTOR", "1");
#else
qputenv("QT_DEVICE_PIXEL_RATIO", "auto"); // See #4840, #4994
#endif
#endif // !Q_OS_WIN
+19 -4
Ver Arquivo
@@ -47,6 +47,19 @@ void OcsJob::appendPath(const QString &id)
setPath(path() + QLatin1Char('/') + id);
}
static QList<QPair<QByteArray, QByteArray>>
percentEncodeQueryItems(
const QList<QPair<QString, QString>> & items)
{
QList<QPair<QByteArray, QByteArray>> result;
foreach (const auto& item, items) {
result.append(qMakePair(
QUrl::toPercentEncoding(item.first),
QUrl::toPercentEncoding(item.second)));
}
return result;
}
void OcsJob::start()
{
QNetworkRequest req;
@@ -57,7 +70,9 @@ void OcsJob::start()
QBuffer *buffer = new QBuffer;
if (_verb == "GET") {
url.setQueryItems(_params);
// Note: QUrl::setQueryItems() does not fully percent encode
// the query items, see #5042
url.setEncodedQueryItems(percentEncodeQueryItems(_params));
} else if (_verb == "POST" || _verb == "PUT") {
// Url encode the _postParams and put them in a buffer.
QByteArray postData;
@@ -73,9 +88,9 @@ void OcsJob::start()
}
//We want json data
auto queryItems = url.queryItems();
queryItems.append(qMakePair(QString::fromLatin1("format"), QString::fromLatin1("json")));
url.setQueryItems(queryItems);
auto queryItems = url.encodedQueryItems();
queryItems.append(qMakePair(QByteArray("format"), QByteArray("json")));
url.setEncodedQueryItems(queryItems);
setReply(davRequest(_verb, url, req, buffer));
setupConnections(reply());
+60 -16
Ver Arquivo
@@ -92,9 +92,9 @@ ownCloudGui::ownCloudGui(Application *parent) :
this,SLOT(slotSyncStateChange(Folder*)));
connect( AccountManager::instance(), SIGNAL(accountAdded(AccountState*)),
SLOT(setupContextMenu()));
SLOT(setupContextMenuIfVisible()));
connect( AccountManager::instance(), SIGNAL(accountRemoved(AccountState*)),
SLOT(setupContextMenu()));
SLOT(setupContextMenuIfVisible()));
connect( Logger::instance(), SIGNAL(guiLog(QString,QString)),
SLOT(slotShowTrayMessage(QString,QString)));
@@ -193,7 +193,7 @@ void ownCloudGui::slotTrayClicked( QSystemTrayIcon::ActivationReason reason )
void ownCloudGui::slotSyncStateChange( Folder* folder )
{
slotComputeOverallSyncStatus();
setupContextMenu();
setupContextMenuIfVisible();
if( !folder ) {
return; // Valid, just a general GUI redraw was needed.
@@ -215,7 +215,7 @@ void ownCloudGui::slotSyncStateChange( Folder* folder )
void ownCloudGui::slotFoldersChanged()
{
slotComputeOverallSyncStatus();
setupContextMenu();
setupContextMenuIfVisible();
}
void ownCloudGui::slotOpenPath(const QString &path)
@@ -225,7 +225,7 @@ void ownCloudGui::slotOpenPath(const QString &path)
void ownCloudGui::slotAccountStateChanged()
{
setupContextMenu();
setupContextMenuIfVisible();
slotComputeOverallSyncStatus();
}
@@ -367,7 +367,7 @@ void ownCloudGui::addAccountContextMenu(AccountStatePtr accountState, QMenu *men
menu->addAction(tr("Managed Folders:"))->setDisabled(true);
}
QAction *action = new QAction( tr("Open folder '%1'").arg(folder->shortGuiLocalPath()), this );
QAction *action = new QAction( tr("Open folder '%1'").arg(folder->shortGuiLocalPath()), menu );
connect(action, SIGNAL(triggered()),_folderOpenActionMapper, SLOT(map()));
_folderOpenActionMapper->setMapping( action, folder->alias() );
menu->addAction(action);
@@ -399,8 +399,26 @@ void ownCloudGui::addAccountContextMenu(AccountStatePtr accountState, QMenu *men
}
static bool minimalTrayMenu()
{
static QByteArray var = qgetenv("OWNCLOUD_MINIMAL_TRAY_MENU");
return !var.isEmpty();
}
void ownCloudGui::setupContextMenu()
{
// The tray menu is surprisingly problematic. Being able to switch to
// a minimal version of it is a useful workaround and testing tool.
if (minimalTrayMenu()) {
if (!_contextMenu) {
_contextMenu.reset(new QMenu());
_recentActionsMenu = new QMenu(tr("Recent Changes"), _contextMenu.data());
_tray->setContextMenu(_contextMenu.data());
_contextMenu->addAction(_actionQuit);
}
return;
}
auto accountList = AccountManager::instance()->accounts();
bool isConfigured = (!accountList.isEmpty());
@@ -432,9 +450,13 @@ void ownCloudGui::setupContextMenu()
_tray->hide();
}
_contextMenu->clear();
slotRebuildRecentMenus();
} else {
_contextMenu.reset(new QMenu());
// Update the context menu whenever we're about to show it
// to the user.
connect(_contextMenu.data(), SIGNAL(aboutToShow()), SLOT(setupContextMenu()));
_recentActionsMenu = new QMenu(tr("Recent Changes"), _contextMenu.data());
// this must be called only once after creating the context menu, or
// it will trigger a bug in Ubuntu's SNI bridge patch (11.10, 12.04).
@@ -459,6 +481,8 @@ void ownCloudGui::setupContextMenu()
#endif
}
_contextMenu->setTitle(Theme::instance()->appNameGUI() );
slotRebuildRecentMenus();
// We must call deleteLater because we might be called from the press in one of the actions.
foreach (auto menu, _accountMenus) { menu->deleteLater(); }
_accountMenus.clear();
@@ -534,6 +558,11 @@ void ownCloudGui::setupContextMenu()
}
}
void ownCloudGui::setupContextMenuIfVisible()
{
if (_contextMenu && _contextMenu->isVisible())
setupContextMenu();
}
void ownCloudGui::slotShowTrayMessage(const QString &title, const QString &msg)
{
@@ -640,18 +669,29 @@ void ownCloudGui::slotUpdateProgress(const QString &folder, const ProgressInfo&
} else if (progress.totalSize() == 0 ) {
quint64 currentFile = progress.currentFile();
quint64 totalFileCount = qMax(progress.totalFiles(), currentFile);
_actionStatus->setText( tr("Syncing %1 of %2 (%3 left)")
.arg( currentFile ).arg( totalFileCount )
.arg( Utility::durationToDescriptiveString2(progress.totalProgress().estimatedEta) ) );
QString msg;
if (progress.trustEta()) {
msg = tr("Syncing %1 of %2 (%3 left)")
.arg( currentFile ).arg( totalFileCount )
.arg( Utility::durationToDescriptiveString2(progress.totalProgress().estimatedEta) );
} else {
msg = tr("Syncing %1 of %2")
.arg( currentFile ).arg( totalFileCount );
}
_actionStatus->setText( msg );
} else {
QString totalSizeStr = Utility::octetsToString( progress.totalSize() );
_actionStatus->setText( tr("Syncing %1 (%2 left)")
.arg( totalSizeStr, Utility::durationToDescriptiveString2(progress.totalProgress().estimatedEta) ) );
QString msg;
if (progress.trustEta()) {
msg = tr("Syncing %1 (%2 left)")
.arg( totalSizeStr, Utility::durationToDescriptiveString2(progress.totalProgress().estimatedEta) );
} else {
msg = tr("Syncing %1")
.arg( totalSizeStr );
}
_actionStatus->setText( msg );
}
_actionRecent->setIcon( QIcon() ); // Fixme: Set a "in-progress"-item eventually.
if (!progress._lastCompletedItem.isEmpty()
@@ -682,7 +722,11 @@ void ownCloudGui::slotUpdateProgress(const QString &folder, const ProgressInfo&
}
_recentItemsActions.append(action);
slotRebuildRecentMenus();
// Update the "Recent" menu if the context menu is being shown,
// otherwise it'll be updated later, when the context menu is opened.
if (_contextMenu && _contextMenu->isVisible()) {
slotRebuildRecentMenus();
}
}
if (progress.isUpdatingEstimates()
+1
Ver Arquivo
@@ -57,6 +57,7 @@ signals:
public slots:
void setupContextMenu();
void setupContextMenuIfVisible();
void slotComputeOverallSyncStatus();
void slotShowTrayMessage(const QString &title, const QString &msg);
void slotShowOptionalTrayMessage(const QString &title, const QString &msg);
+9 -1
Ver Arquivo
@@ -142,11 +142,15 @@ void OwncloudSetupWizard::slotDetermineAuthType(const QString &urlString)
void OwncloudSetupWizard::slotOwnCloudFoundAuth(const QUrl& url, const QVariantMap &info)
{
auto serverVersion = CheckServerJob::version(info);
_ocWizard->appendToConfigurationLog(tr("<font color=\"green\">Successfully connected to %1: %2 version %3 (%4)</font><br/><br/>")
.arg(url.toString())
.arg(Theme::instance()->appNameGUI())
.arg(CheckServerJob::versionString(info))
.arg(CheckServerJob::version(info)));
.arg(serverVersion));
_ocWizard->account()->setServerVersion(serverVersion);
QString p = url.path();
if (p.endsWith("/status.php")) {
@@ -504,6 +508,10 @@ DetermineAuthTypeJob::DetermineAuthTypeJob(AccountPtr account, QObject *parent)
: AbstractNetworkJob(account, QString(), parent)
, _redirects(0)
{
// This job implements special redirect handling to detect redirections
// to pages that are indicative of Shibboleth-using servers. Hence we
// disable the standard job redirection handling here.
_followRedirects = false;
}
void DetermineAuthTypeJob::start()
-1
Ver Arquivo
@@ -93,7 +93,6 @@ private:
OwncloudWizard* _ocWizard;
QString _initLocalFolder;
QString _remoteFolder;
};
}
+7 -9
Ver Arquivo
@@ -121,17 +121,9 @@ void ProtocolWidget::hideEvent(QHideEvent *ev)
void ProtocolWidget::cleanItems(const QString& folder)
{
int itemCnt = _ui->_treeWidget->topLevelItemCount();
// Limit the number of items
while(itemCnt > 2000) {
delete _ui->_treeWidget->takeTopLevelItem(itemCnt - 1);
itemCnt--;
}
// The issue list is a state, clear it and let the next sync fill it
// with ignored files and propagation errors.
itemCnt = _issueItemView->topLevelItemCount();
int itemCnt = _issueItemView->topLevelItemCount();
for( int cnt = itemCnt-1; cnt >=0 ; cnt-- ) {
QTreeWidgetItem *item = _issueItemView->topLevelItem(cnt);
QString itemFolder = item->data(2, Qt::UserRole).toString();
@@ -239,6 +231,12 @@ void ProtocolWidget::slotItemCompleted(const QString &folder, const SyncFileItem
_issueItemView->insertTopLevelItem(0, line);
emit issueItemCountUpdated(_issueItemView->topLevelItemCount());
} else {
// Limit the number of items
int itemCnt = _ui->_treeWidget->topLevelItemCount();
while(itemCnt > 2000) {
delete _ui->_treeWidget->takeTopLevelItem(itemCnt - 1);
itemCnt--;
}
_ui->_treeWidget->insertTopLevelItem(0, line);
}
}
+26
Ver Arquivo
@@ -23,6 +23,7 @@
#include <QBuffer>
#include <QClipboard>
#include <QFileInfo>
#include <QDesktopServices>
namespace OCC {
@@ -53,6 +54,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 +229,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 +274,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 +331,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 +347,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);
@@ -366,8 +375,10 @@ void ShareLinkWidget::slotCheckBoxShareLinkClicked()
_ui->checkBox_password->setText(tr("Public sh&aring requires a password"));
_ui->checkBox_expire->setEnabled(false);
_ui->checkBox_editing->setEnabled(false);
_ui->lineEdit_password->setEnabled(true);
_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);
@@ -432,6 +444,7 @@ void ShareLinkWidget::slotCheckBoxPasswordClicked()
_ui->lineEdit_password->show();
_ui->pushButton_setPassword->show();
_ui->lineEdit_password->setPlaceholderText(tr("Please Set Password"));
_ui->lineEdit_password->setEnabled(true);
_ui->lineEdit_password->setFocus();
} else {
setPassword(QString());
@@ -473,6 +486,19 @@ void ShareLinkWidget::slotPushButtonCopyLinkPressed()
#endif
}
void ShareLinkWidget::slotPushButtonMailLinkPressed()
{
QString fileName = _sharePath.mid(_sharePath.lastIndexOf('/') + 1);
QDesktopServices::openUrl(QUrl(QString(
"mailto: "
"?subject=I shared %1 with you"
"&body=%2").arg(
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">
+8 -4
Ver Arquivo
@@ -248,10 +248,12 @@ void ShareUserGroupWidget::slotCompleterActivated(const QModelIndex & index)
layout->addWidget(indicator);
/*
* Don't send the reshare permissions for federataed shares
* Don't send the reshare permissions for federated shares for servers <9.1
* https://github.com/owncloud/core/issues/22122#issuecomment-185637344
* https://github.com/owncloud/client/issues/4996
*/
if (sharee->type() == Sharee::Federated) {
if (sharee->type() == Sharee::Federated
&& _account->serverVersionInt() < 0x090100) {
int permissions = SharePermissionRead | SharePermissionUpdate;
if (!_isFile) {
permissions |= SharePermissionCreate | SharePermissionDelete;
@@ -335,10 +337,12 @@ ShareWidget::ShareWidget(QSharedPointer<Share> share,
connect(_ui->permissionsEdit, SIGNAL(clicked(bool)), SLOT(slotEditPermissionsChanged()));
/*
* We don't show permssion share for federated shares
* We don't show permssion share for federated shares with server <9.1
* https://github.com/owncloud/core/issues/22122#issuecomment-185637344
* https://github.com/owncloud/client/issues/4996
*/
if (share->getShareType() == Share::TypeRemote) {
if (share->getShareType() == Share::TypeRemote
&& share->account()->serverVersionInt() < 0x090100) {
_ui->permissionShare->setVisible(false);
_ui->permissionToolButton->setVisible(false);
}
+4 -2
Ver Arquivo
@@ -74,7 +74,7 @@ SocketApi::SocketApi(QObject* parent)
if (Utility::isWindows()) {
socketPath = QLatin1String("\\\\.\\pipe\\")
+ QLatin1String("ownCloud") + '\\'
+ QLatin1String("ownCloud-")
+ QString::fromLocal8Bit(qgetenv("USERNAME"));
// TODO: once the windows extension supports multiple
// client connections, switch back to the theme name
@@ -171,7 +171,9 @@ void SocketApi::slotReadSocket()
Q_ASSERT(socket);
while(socket->canReadLine()) {
QString line = QString::fromUtf8(socket->readLine());
// Make sure to normalize the input from the socket to
// make sure that the path will match, especially on OS X.
QString line = QString::fromUtf8(socket->readLine()).normalized(QString::NormalizationForm_C);
line.chop(1); // remove the '\n'
QString command = line.split(":").value(0);
QString function = QString(QLatin1String("command_")).append(command);
+18 -6
Ver Arquivo
@@ -81,13 +81,16 @@ QString SyncRunFileLog::instructionToStr( csync_instructions_e inst )
case CSYNC_INSTRUCTION_TYPE_CHANGE:
re = "INST_TYPE_CHANGE";
break;
case CSYNC_INSTRUCTION_UPDATE_METADATA:
re = "INST_METADATA";
break;
}
return re;
}
void SyncRunFileLog::start(const QString &folderPath, const Utility::StopWatch &stopWatch )
void SyncRunFileLog::start(const QString &folderPath)
{
const qint64 logfileMaxSize = 1024*1024; // 1MiB
@@ -108,8 +111,6 @@ void SyncRunFileLog::start(const QString &folderPath, const Utility::StopWatch
_file->open(QIODevice::WriteOnly | QIODevice::Append | QIODevice::Text);
_out.setDevice( _file.data() );
QDateTime dt = stopWatch.startTime();
QDateTime de = stopWatch.timeOfLap(QLatin1String("Sync Finished"));
if (!exists) {
// We are creating a new file, add the note.
@@ -122,8 +123,9 @@ void SyncRunFileLog::start(const QString &folderPath, const Utility::StopWatch
}
_out << "#=#=#=# Syncrun started " << dateTimeStr(dt) << " until " << dateTimeStr(de) << " ("
<< stopWatch.durationOfLap(QLatin1String("Sync Finished")) << " msec)" << endl;
_totalDuration.start();
_lapDuration.start();
_out << "#=#=#=# Syncrun started " << dateTimeStr(QDateTime::currentDateTime()) << endl;
}
void SyncRunFileLog::logItem( const SyncFileItem& item )
@@ -162,8 +164,18 @@ void SyncRunFileLog::logItem( const SyncFileItem& item )
_out << endl;
}
void SyncRunFileLog::close()
void SyncRunFileLog::logLap(const QString& name)
{
_out << "#=#=#=#=# " << name << " " << dateTimeStr(QDateTime::currentDateTime())
<< " (last step: " << _lapDuration.restart() << " msec"
<< ", total: " << _totalDuration.elapsed() << " msec)" << endl;
}
void SyncRunFileLog::finish()
{
_out << "#=#=#=# Syncrun finished " << dateTimeStr(QDateTime::currentDateTime())
<< " (last step: " << _lapDuration.elapsed() << " msec"
<< ", total: " << _totalDuration.elapsed() << " msec)" << endl;
_file->close();
}
+6 -4
Ver Arquivo
@@ -17,9 +17,9 @@
#include <QFile>
#include <QTextStream>
#include <QScopedPointer>
#include <QElapsedTimer>
#include "syncfileitem.h"
#include "utility.h"
namespace OCC {
class SyncFileItem;
@@ -32,9 +32,10 @@ class SyncRunFileLog
{
public:
SyncRunFileLog();
void start( const QString& folderPath, const Utility::StopWatch& stopWatch );
void start( const QString& folderPath );
void logItem( const SyncFileItem& item );
void close();
void logLap( const QString& name );
void finish();
protected:
@@ -45,7 +46,8 @@ private:
QScopedPointer<QFile> _file;
QTextStream _out;
QElapsedTimer _totalDuration;
QElapsedTimer _lapDuration;
};
}
+12 -6
Ver Arquivo
@@ -30,7 +30,6 @@ OwncloudHttpCredsPage::OwncloudHttpCredsPage(QWidget* parent)
: AbstractCredentialsWizardPage(),
_ui(),
_connected(false),
_checking(false),
_progressIndi(new QProgressIndicator (this))
{
_ui.setupUi(this);
@@ -114,6 +113,8 @@ void OwncloudHttpCredsPage::initializePage()
_ui.lePassword->setText(password);
}
}
_ui.tokenLabel->setText(HttpCredentialsGui::requestAppPasswordText(ocWizard->account().data()));
_ui.tokenLabel->setVisible(!_ui.tokenLabel->text().isEmpty());
_ui.leUsername->setFocus();
}
@@ -131,14 +132,20 @@ bool OwncloudHttpCredsPage::validatePage()
if (!_connected) {
_ui.errorLabel->setVisible(false);
_checking = true;
startSpinner();
// Reset cookies to ensure the username / password is actually used
OwncloudWizard* ocWizard = qobject_cast< OwncloudWizard* >(wizard());
ocWizard->account()->clearCookieJar();
emit completeChanged();
emit connectToOCUrl(field("OCUrl").toString().simplified());
return false;
} else {
_checking = false;
// Reset, to require another connection attempt next time
_connected = false;
emit completeChanged();
stopSpinner();
return true;
@@ -151,9 +158,9 @@ int OwncloudHttpCredsPage::nextId() const
return WizardCommon::Page_AdvancedSetup;
}
void OwncloudHttpCredsPage::setConnected( bool comp )
void OwncloudHttpCredsPage::setConnected()
{
_connected = comp;
_connected = true;
stopSpinner ();
}
@@ -179,7 +186,6 @@ void OwncloudHttpCredsPage::setErrorString(const QString& err)
_ui.errorLabel->setVisible(true);
_ui.errorLabel->setText(err);
}
_checking = false;
emit completeChanged();
stopSpinner();
}
+1 -2
Ver Arquivo
@@ -40,7 +40,7 @@ public:
void cleanupPage() Q_DECL_OVERRIDE;
bool validatePage() Q_DECL_OVERRIDE;
int nextId() const Q_DECL_OVERRIDE;
void setConnected(bool connected);
void setConnected();
void setErrorString( const QString& err );
Q_SIGNALS:
@@ -53,7 +53,6 @@ private:
Ui_OwncloudHttpCredsPage _ui;
bool _connected;
bool _checking;
QProgressIndicator* _progressIndi;
OwncloudWizard* _ocWizard;
};
+49 -36
Ver Arquivo
@@ -7,14 +7,30 @@
<x>0</x>
<y>0</y>
<width>350</width>
<height>196</height>
<height>248</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="0">
<item row="5" column="1">
<layout class="QHBoxLayout" name="resultLayout"/>
</item>
<item row="0" column="0" colspan="3">
<widget class="QLabel" name="topLabel">
<property name="text">
<string notr="true">TextLabel</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="0">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
@@ -30,7 +46,23 @@
</property>
</spacer>
</item>
<item row="1" column="1">
<item row="3" column="2">
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>48</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="3" column="1">
<layout class="QFormLayout" name="formLayout">
<item row="0" column="0">
<widget class="QLabel" name="usernameLabel">
@@ -43,7 +75,7 @@
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<widget class="QLabel" name="passwordLabel">
<property name="text">
<string>&amp;Password</string>
</property>
@@ -55,7 +87,7 @@
<item row="2" column="0" colspan="2">
<widget class="QLabel" name="errorLabel">
<property name="text">
<string>Error Label</string>
<string notr="true">Error Label</string>
</property>
<property name="openExternalLinks">
<bool>true</bool>
@@ -74,7 +106,7 @@
</item>
</layout>
</item>
<item row="2" column="1">
<item row="4" column="1">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
@@ -87,42 +119,23 @@
</property>
</spacer>
</item>
<item row="1" column="2">
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>48</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="3" column="1">
<layout class="QHBoxLayout" name="resultLayout"/>
</item>
<item row="0" column="0" colspan="3">
<widget class="QLabel" name="topLabel">
<item row="6" column="0" colspan="3">
<widget class="QLabel" name="bottomLabel">
<property name="text">
<string>TextLabel</string>
<string notr="true">TextLabel</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="tokenLabel">
<property name="text">
<string notr="true">TextLabel</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="4" column="0" colspan="3">
<widget class="QLabel" name="bottomLabel">
<property name="text">
<string>TextLabel</string>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
+1 -7
Ver Arquivo
@@ -125,7 +125,7 @@ void OwncloudWizard::successfulStep()
switch (id) {
case WizardCommon::Page_HttpCreds:
_httpCredsPage->setConnected(true);
_httpCredsPage->setConnected();
break;
case WizardCommon::Page_ShibbolethCreds:
@@ -172,12 +172,6 @@ void OwncloudWizard::slotCurrentPageChanged( int id )
}
setOption(QWizard::HaveCustomButton1, id == WizardCommon::Page_AdvancedSetup);
if (id == WizardCommon::Page_AdvancedSetup) {
// Going back from this page messes the state as the account is created already
button(QWizard::BackButton)->setDisabled(true);
}
}
void OwncloudWizard::displayError( const QString& msg, bool retryHTTPonly )
+1 -1
Ver Arquivo
@@ -43,7 +43,7 @@ namespace OCC {
AbstractNetworkJob::AbstractNetworkJob(AccountPtr account, const QString &path, QObject *parent)
: QObject(parent)
, _timedout(false)
, _followRedirects(false)
, _followRedirects(true)
, _account(account)
, _ignoreCredentialFailure(false)
, _reply(0)
+28 -25
Ver Arquivo
@@ -38,8 +38,6 @@ namespace OCC {
Account::Account(QObject *parent)
: QObject(parent)
, _capabilities(QVariantMap())
, _am(0)
, _credentials(0)
, _davPath( Theme::instance()->webDavPath() )
, _wasMigrated(false)
{
@@ -55,8 +53,6 @@ AccountPtr Account::create()
Account::~Account()
{
delete _credentials;
delete _am;
}
QString Account::davPath() const
@@ -117,14 +113,14 @@ bool Account::changed(AccountPtr other, bool ignoreUrlProtocol) const
changes = (_url == other->_url);
}
changes |= _credentials->changed(other->_credentials);
changes |= _credentials->changed(other->credentials());
return changes;
}
AbstractCredentials *Account::credentials() const
{
return _credentials;
return _credentials.data();
}
void Account::setCredentials(AbstractCredentials *cred)
@@ -135,29 +131,27 @@ void Account::setCredentials(AbstractCredentials *cred)
jar = _am->cookieJar();
jar->setParent(0);
_am->deleteLater();
}
if (_credentials) {
credentials()->deleteLater();
_am = QSharedPointer<QNetworkAccessManager>();
}
// The order for these two is important! Reading the credential's
// settings accesses the account as well as account->_credentials
_credentials = cred;
// settings accesses the account as well as account->_credentials,
// so deleteLater must be used.
_credentials = QSharedPointer<AbstractCredentials>(cred, &QObject::deleteLater);
cred->setAccount(this);
_am = _credentials->getQNAM();
_am = QSharedPointer<QNetworkAccessManager>(_credentials->getQNAM(), &QObject::deleteLater);
if (jar) {
_am->setCookieJar(jar);
}
connect(_am, SIGNAL(sslErrors(QNetworkReply*,QList<QSslError>)),
connect(_am.data(), SIGNAL(sslErrors(QNetworkReply*,QList<QSslError>)),
SLOT(slotHandleSslErrors(QNetworkReply*,QList<QSslError>)));
connect(_am, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)),
connect(_am.data(), SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)),
SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)));
connect(_credentials, SIGNAL(fetched()),
connect(_credentials.data(), SIGNAL(fetched()),
SLOT(slotCredentialsFetched()));
connect(_credentials, SIGNAL(asked()),
connect(_credentials.data(), SIGNAL(asked()),
SLOT(slotCredentialsAsked()));
}
@@ -196,18 +190,21 @@ void Account::resetNetworkAccessManager()
qDebug() << "Resetting QNAM";
QNetworkCookieJar* jar = _am->cookieJar();
_am->deleteLater();
_am = _credentials->getQNAM();
// Use a QSharedPointer to allow locking the life of the QNAM on the stack.
// Make it call deleteLater to make sure that we can return to any QNAM stack frames safely.
_am = QSharedPointer<QNetworkAccessManager>(_credentials->getQNAM(), &QObject::deleteLater);
_am->setCookieJar(jar); // takes ownership of the old cookie jar
connect(_am, SIGNAL(sslErrors(QNetworkReply*,QList<QSslError>)),
connect(_am.data(), SIGNAL(sslErrors(QNetworkReply*,QList<QSslError>)),
SLOT(slotHandleSslErrors(QNetworkReply*,QList<QSslError>)));
connect(_am, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)),
connect(_am.data(), SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)),
SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)));
}
QNetworkAccessManager *Account::networkAccessManager()
{
return _am;
return _am.data();
}
QNetworkReply *Account::headRequest(const QString &relPath)
@@ -430,6 +427,12 @@ void Account::slotHandleSslErrors(QNetworkReply *reply , QList<QSslError> errors
return;
}
// SslDialogErrorHandler::handleErrors will run an event loop that might execute
// the deleteLater() of the QNAM before we have the chance of unwinding our stack.
// Keep a ref here on our stackframe to make sure that it doesn't get deleted before
// handleErrors returns.
QSharedPointer<QNetworkAccessManager> qnamLock = _am;
if (_sslErrorHandler->handleErrors(errors, reply->sslConfiguration(), &approvedCerts, sharedFromThis())) {
QSslSocket::addDefaultCaCertificates(approvedCerts);
addApprovedCerts(approvedCerts);
@@ -459,12 +462,12 @@ void Account::slotHandleSslErrors(QNetworkReply *reply , QList<QSslError> errors
void Account::slotCredentialsFetched()
{
emit credentialsFetched(_credentials);
emit credentialsFetched(_credentials.data());
}
void Account::slotCredentialsAsked()
{
emit credentialsAsked(_credentials);
emit credentialsAsked(_credentials.data());
}
void Account::handleInvalidCredentials()
+2 -2
Ver Arquivo
@@ -214,8 +214,8 @@ private:
QString _serverVersion;
QScopedPointer<AbstractSslErrorHandler> _sslErrorHandler;
QuotaInfo *_quotaInfo;
QNetworkAccessManager *_am;
AbstractCredentials* _credentials;
QSharedPointer<QNetworkAccessManager> _am;
QSharedPointer<AbstractCredentials> _credentials;
/// Certificates that were explicitly rejected by the user
QList<QSslCertificate> _rejectedCertificates;
+2 -1
Ver Arquivo
@@ -73,7 +73,8 @@ bool Capabilities::shareResharing() const
bool Capabilities::notificationsAvailable() const
{
return _capabilities.contains("notifications");
// We require the OCS style API in 9.x, can't deal with the REST one only found in 8.2
return _capabilities.contains("notifications") && _capabilities["notifications"].toMap().contains("ocs-endpoints");
}
bool Capabilities::isValid() const
+25 -8
Ver Arquivo
@@ -210,7 +210,7 @@ int get_errno_from_http_errcode( int err, const QString & reason ) {
DiscoverySingleDirectoryJob::DiscoverySingleDirectoryJob(const AccountPtr &account, const QString &path, QObject *parent)
: QObject(parent), _subPath(path), _account(account), _ignoredFirst(false)
: QObject(parent), _subPath(path), _account(account), _ignoredFirst(false), _isRootPath(false)
{
}
@@ -218,10 +218,15 @@ void DiscoverySingleDirectoryJob::start()
{
// Start the actual HTTP job
LsColJob *lsColJob = new LsColJob(_account, _subPath, this);
lsColJob->setProperties(QList<QByteArray>() << "resourcetype" << "getlastmodified"
<< "getcontentlength" << "getetag" << "http://owncloud.org/ns:id"
<< "http://owncloud.org/ns:downloadURL" << "http://owncloud.org/ns:dDC"
<< "http://owncloud.org/ns:permissions");
QList<QByteArray> props;
props << "resourcetype" << "getlastmodified" << "getcontentlength" << "getetag"
<< "http://owncloud.org/ns:id" << "http://owncloud.org/ns:downloadURL"
<< "http://owncloud.org/ns:dDC" << "http://owncloud.org/ns:permissions";
if (_isRootPath)
props << "http://owncloud.org/ns:data-fingerprint";
lsColJob->setProperties(props);
QObject::connect(lsColJob, SIGNAL(directoryListingIterated(QString,QMap<QString,QString>)),
this, SLOT(directoryListingIteratedSlot(QString,QMap<QString,QString>)));
@@ -299,12 +304,14 @@ void DiscoverySingleDirectoryJob::directoryListingIteratedSlot(QString file, con
{
//qDebug() << Q_FUNC_INFO << _subPath << file << map.count() << map.keys() << _account->davPath() << _lsColJob->reply()->request().url().path();
if (!_ignoredFirst) {
// First result is the directory itself. Maybe should have a better check for that? FIXME
// The first entry is for the folder itself, we should process it differently.
_ignoredFirst = true;
if (map.contains("permissions")) {
emit firstDirectoryPermissions(map.value("permissions"));
}
if (map.contains("data-fingerprint")) {
_dataFingerprint = map.value("data-fingerprint").toUtf8();
}
} else {
// Remove <webDAV-Url>/folder/ from <webDAV-Url>/folder/subfile.txt
file.remove(0, _lsColJob->reply()->request().url().path().length());
@@ -426,6 +433,11 @@ void DiscoveryMainThread::doOpendirSlot(const QString &subPath, DiscoveryDirecto
this, SIGNAL(etagConcatenation(QString)));
QObject::connect(_singleDirJob, SIGNAL(etag(QString)),
this, SIGNAL(etag(QString)));
if (!_firstFolderProcessed) {
_singleDirJob->setIsRootPath();
}
_singleDirJob->start();
}
@@ -441,7 +453,12 @@ void DiscoveryMainThread::singleDirectoryJobResultSlot(const QList<FileStatPoint
_currentDiscoveryDirectoryResult->list = result;
_currentDiscoveryDirectoryResult->code = 0;
_currentDiscoveryDirectoryResult->listIndex = 0;
_currentDiscoveryDirectoryResult = 0; // the sync thread owns it now
_currentDiscoveryDirectoryResult = 0; // the sync thread owns it now
if (!_firstFolderProcessed) {
_firstFolderProcessed = true;
_dataFingerprint = _singleDirJob->_dataFingerprint;
}
_discoveryJob->_vioMutex.lock();
_discoveryJob->_vioWaitCondition.wakeAll();
+13 -1
Ver Arquivo
@@ -81,6 +81,8 @@ class DiscoverySingleDirectoryJob : public QObject {
Q_OBJECT
public:
explicit DiscoverySingleDirectoryJob(const AccountPtr &account, const QString &path, QObject *parent = 0);
// Specify thgat this is the root and we need to check the data-fingerprint
void setIsRootPath() { _isRootPath = true; }
void start();
void abort();
// This is not actually a network job, it is just a job
@@ -100,8 +102,15 @@ private:
QString _etagConcatenation;
QString _firstEtag;
AccountPtr _account;
// The first result is for the directory itself and need to be ignored.
// This flag is true if it was already ignored.
bool _ignoredFirst;
// Set to true if this is the root path and we need to check the data-fingerprint
bool _isRootPath;
QPointer<LsColJob> _lsColJob;
public:
QByteArray _dataFingerprint;
};
// Lives in main thread. Deleted by the SyncEngine
@@ -115,13 +124,16 @@ class DiscoveryMainThread : public QObject {
AccountPtr _account;
DiscoveryDirectoryResult *_currentDiscoveryDirectoryResult;
qint64 *_currentGetSizeResult;
bool _firstFolderProcessed;
public:
DiscoveryMainThread(AccountPtr account) : QObject(), _account(account),
_currentDiscoveryDirectoryResult(0), _currentGetSizeResult(0)
_currentDiscoveryDirectoryResult(0), _currentGetSizeResult(0), _firstFolderProcessed(false)
{ }
void abort();
QByteArray _dataFingerprint;
public slots:
// From DiscoveryJob:
+8 -1
Ver Arquivo
@@ -42,9 +42,16 @@ ExcludedFiles& ExcludedFiles::instance()
void ExcludedFiles::addExcludeFilePath(const QString& path)
{
_excludeFiles.append(path);
_excludeFiles.insert(path);
}
#ifdef WITH_UNIT_TESTING
void ExcludedFiles::addExcludeExpr(const QString &expr)
{
_csync_exclude_add(_excludesPtr, expr.toLatin1().constData());
}
#endif
bool ExcludedFiles::reloadExcludes()
{
c_strlist_destroy(*_excludesPtr);

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