1
0
mirror of https://github.com/chylex/Nextcloud-Desktop.git synced 2024-11-26 04:42:45 +01:00
Commit Graph

5475 Commits

Author SHA1 Message Date
Olivier Goffart
38f1c5b7d2 Logger: Guard zlib usage by ZLIB_FOUND
Similar to the use for the checksum.
I know that zlib is required in principle, but i don't have it
in one of my test building environment, and it is easier to just
disable it.
2018-04-18 15:01:30 +02:00
Christian Kamm
985a657f48 Merge remote-tracking branch 'origin/master' 2018-04-18 11:14:08 +02:00
Christian Kamm
9e8464e114 Merge branch 'placeholder-prototype' 2018-04-18 11:02:53 +02:00
Olivier Goffart
02b818af04 Download: Use the <s:message> from the reply in the error message if any
Issue: #6459
2018-04-18 10:57:16 +02:00
Christian Kamm
b7412a4f09 Wizards: Show placeholder option only if showExperimentalOptions is set
This config file option will also control other features in the future.
2018-04-18 10:27:51 +02:00
Christian Kamm
ba1309b3a4 Wizards: Add placeholder option and warning to account wizard
Also add the warning dialog to the option in the folder wizard.
2018-04-18 10:27:51 +02:00
Christian Kamm
70b4dc99dc NSIS: Register placeholder extension
Also change the placeholder suffix config option to not include the dot,
the dotless form is needed in the nsis script.
2018-04-18 10:27:51 +02:00
Christian Kamm
65a2b1aa8a Placeholders: Fix migration issues
Some edgecases weren't covered and didn't have tests yet.
2018-04-18 10:27:51 +02:00
Christian Kamm
fb3e3edcbd SyncOptions: Add default placeholder suffix
Otherwise each test has to set this up anew.
2018-04-18 10:27:51 +02:00
Christian Kamm
c2f84d7c3e Placeholders: Ignore placeholder files in older clients
To do this, we add the placeholder extension to the user exclude file
automatically. However, newer clients shouldn't use that exclude
pattern: so we also add version directives that allow making exclude
patterns dependent on the client version.
2018-04-18 10:27:51 +02:00
Christian Kamm
8358dabbfd Folder: Simplify relative path computation
It was done manually in several places after folderForPath() calls.
2018-04-18 10:27:51 +02:00
Christian Kamm
8b6ae04155 Placeholders: Download from shell integration 2018-04-18 10:27:51 +02:00
Olivier Goffart
87433bfe87 Placeholder: The extension is now a branding option 2018-04-18 10:27:51 +02:00
Olivier Goffart
9bd583b0e5 Placeholders: Fixup clicking on placeholder after previous change
Now that the name in the db is the name of the placeholder file,
we need to adjust the call to downloadPlaceholder
2018-04-18 10:27:51 +02:00
Christian Kamm
01bb241e48 Placeholders: Safe migration to older client versions
Now the db entries for placeholders will have the full placeholder
paths. That way older clients will, on remote discovery, delete the
placeholders and download the real files.
2018-04-18 10:27:51 +02:00
Christian Kamm
e2f2c9a153 Placeholders: Deal with conflicts when a placeholder exists
So "foo.owncloud" exists but the user adds a new "foo".
2018-04-18 10:27:51 +02:00
Olivier Goffart
a41d385607 Placeholders: install mimetype on linux 2018-04-18 10:27:51 +02:00
Olivier Goffart
a8b4526d65 Placeholders: Add an checkbox in the FolderWizard to enable the placeholder feature 2018-04-18 10:27:51 +02:00
Olivier Goffart
a2191474eb Placeholders: Move the placeholder option from the account to the folder 2018-04-18 10:27:51 +02:00
Olivier Goffart
cc8497916d PlaceHolders: Trigger a download of the placeholder and open it 2018-04-18 10:27:51 +02:00
Christian Kamm
798e60c9f6 On-demand downloading: Placeholder-file based prototype
- Controled by an option.
- New remote files start out as ItemTypePlaceholder, are created with a
  .owncloud extension.
- When their db entry is set to ItemTypePlaceholderDownload the next
  sync run will download them.
- Files that aren't in the placeholder state sync as usual.
- See test cases in testsyncplaceholders.

Missing:
- User ui for triggering placeholder file download
- Maybe: Going back from file to placeholder?
2018-04-18 10:27:51 +02:00
Christian Kamm
57044c1e02 Silence warning by removing unnecessary this capture 2018-04-18 10:26:22 +02:00
Markus Goetz
5509cd2504 Notifications: Also have clickable link #6236 2018-04-17 16:57:38 +02:00
Christian Kamm
fa6ac9da23 Upload: Add more chunk resuming unit tests #6405 2018-04-17 13:48:13 +02:00
Olivier Goffart
2c18ea0a89 Uploads: Don't delete unexisting chunks
Since commit 4dc49ff3, we store an entry in the upload info table even
for non chunked uploads. However, if this fails we don't want to remove
non-existant stale chunks if the upload fails.

Without this commit, we would send a DELETE command to clean non-existant
chunks in the dav/uploads/ namespace.
2018-04-16 12:00:12 +02:00
Christian Kamm
93d8810414 SocketApi/Sharing: Add "copy public link" to menu #6356
* The new menu option will fetch shares and create a new link share if
  no "context menu share" currently exists.
* Various cleanup of common operations in socketapi happened as well,
  in particular there's now FileData::get() that calculates all the
  relevant paths that are useful for most socketapi actions.
2018-04-16 08:37:44 +02:00
Markus Goetz
aaa00c1f30 Q_UNUSED: Sprinkle around 2018-04-13 17:15:37 +02:00
Markus Goetz
2728c49649 Notifications: Lower hiding timeout
With the 4.5sec timeout, it was very easy to accidently hit the wrong notification
when the previous one dissapeared so late.
2018-04-13 16:55:55 +02:00
Markus Goetz
aceff1f863 macOS: Implement new dynamic Finder menu items #6328 2018-04-12 13:12:42 +02:00
Christian Kamm
113f56fdc5 Logging: Add persistent auto-logdir option #6442 2018-04-12 12:38:17 +02:00
Christian Kamm
bd9ec3dbee LogDir: Compress log when switching files #6442 2018-04-12 12:38:17 +02:00
Christian Kamm
6fcff62e95 LogDir: Go to new file on Problem/Abort too #6442 2018-04-12 12:38:17 +02:00
Markus Goetz
894686e66a macOS: Unload the Finder extension on exit #5382 #3819 2018-04-11 13:37:34 +02:00
Christian Kamm
eef275a1e4 Folders: Use "Problem" icon for unresolved conflicts #6277 2018-04-10 08:38:59 +02:00
Olivier Goffart
716be66234 SyncJournalDb::setSelectiveSyncList: Always use a transaction
Issue #6431
2018-04-09 12:22:52 +02:00
Christian Kamm
2298ecca7c Share link: Update permission wording #6192 2018-04-09 12:16:40 +02:00
Olivier Goffart
42b254785e Theme: unify ownCloudTheme and Theme classes
The goal is to avoid confusion described in issue #6422 by removing
duplicates between the Theme and owncloudTheme.

 - Use the about from ownCloudTheme everywhere
 - Create default applicationIcons() and condifFileName() that should work
   everywhere
 - trayFolderIcon was removed as it is not used
 - the helpUrl from the default Theme now points to the owncloud client
   documentation. Before there was no help entry by default for branded
   client if the function was not overriden.
 - Do not merge functions that would otherwise break compatibility with
   theme that did not override them. For example colors or customMedia.
2018-04-05 18:37:29 +02:00
Christian Kamm
02a2056543 Notify if an explicitly excluded folder is created #6222 2018-04-03 14:03:46 +02:00
Christian Kamm
afec3ccf6e Conflicts: Change tags to be more user friendly #6365
From "_conflict-user-yyyymmdd-hhmmss"
to   " (conflicted copy user yyyy-mm-dd hhmmss)"
2018-04-03 14:03:03 +02:00
Olivier Goffart
39d909b05a csync_update: add the checksum in the discovery log
Issue #6414
2018-03-28 13:42:54 +02:00
Christian Kamm
2641a6af21 Rename local discovery option for clarity
It's using full relative filepaths, not just dir paths.
2018-03-28 11:25:32 +02:00
Olivier Goffart
d69936e065 FolderStatusModel: fix potential assert
OCC::FolderStatusModel::slotUpdateDirectories: ASSERT: "parentInfo->_fetching" in file /home/olivier/kdegit/owncloud/mirall/src/gui/folderstatusmodel.cpp, line 599

This can happen if the structure of a folder is change while the user
expands the root folder. In this case, resetSubs() is called which
resets _fetching to false.
Instead, we need to keep a pointer to the job so we can abort it by
deleting it.
2018-03-28 10:19:05 +02:00
Christian Kamm
5e75d224ee Blacklisting must prevent parent etag updates #6411 2018-03-28 10:01:33 +02:00
Markus Goetz
31f13c8846 SslButton: Improve speed (especially on macOS) #6031
From 1+n*450msec to 1*450msec
2018-03-27 17:43:57 +02:00
Christian Kamm
25deaed9e5 Excludes: Expand doc, Desktop.ini only in root folder
The Desktop.ini exclude was added for 2.4 because we add such a file to
the synced folder on Windows. It doesn't need to cover subdirectories.
2018-03-27 12:43:53 +02:00
Christian Kamm
17342031d7 Upload: Simplify 'finished' flag
* Sometimes there was 'finished' and '_finished'
* Make each done() call automatically set _finished to true
2018-03-27 12:42:48 +02:00
Olivier Goffart
26b991c0c0 Folder: normalize the local path.
We otherwise normalize all path in the C form, so we must have
the Folder's path normalized the same. Or all comparizon will fail
(such as knowing if a file from the SocketAPI or the FilesystemWatcher
are part of the folder)

Issue #4424
2018-03-27 10:54:10 +02:00
Olivier Goffart
3f4d504c34 propagateuploadv1: don't finalize after a done()
Should fix an assert when "Server does not support X-OC-MTime"
(Which only happens with owncloud 5)

Issue #6403
2018-03-27 10:50:40 +02:00
Markus Goetz
7739157bfc SslButton: Add HTTP/2 info #3146 2018-03-26 22:49:54 +02:00
Markus Goetz
75a269acb6 About section: Try to lower height #6075 #6215 2018-03-22 15:37:04 +01:00
Dominik Schmidt
d69e9ebf46 Apply branding to crashreporter resources file 2018-03-16 16:59:01 +01:00
Dominik Schmidt
24bf1b3629 Define APPLICATION_ICON_NAME fallback only in one place 2018-03-16 16:59:01 +01:00
Dominik Schmidt
94b0c9f78e Fix crash reporter icon 2018-03-16 16:59:01 +01:00
Christian Kamm
a89508ba26 Minor header fixup
To make the IDE happy.
2018-03-16 13:41:57 +01:00
Olivier Goffart
0bf0f92949 OwnSql: Fixup after feedback for #6388 2018-03-15 19:30:21 +01:00
Olivier Goffart
04f8d0f2bc OwnSql: Put the SQL queries next to their use.
This avoid haivng to modify 4 places when we want to add a query
2018-03-15 19:30:21 +01:00
Olivier Goffart
4584e5d3c5 OwnSql: Some refactoring
Use QByteArray for the query so we don't have to convert twice.
Automatically finish the query when the DB close, so we don't
have to call reset
2018-03-15 19:30:21 +01:00
Olivier Goffart
bbf1843865 SyncEngine: remove the "CSync" wording from the error messages
They are confusing for the user.
Example in issue #6274
2018-03-14 10:25:45 +01:00
Olivier Goffart
b6aaa6fd2b CSync: Remove unused error codes
None of the removed ERRNO code were ever set.
So none of the removed error hapenned anymore
2018-03-14 10:25:45 +01:00
Olivier Goffart
0031e09410 CSync: reconcile never returns an error 2018-03-14 10:25:45 +01:00
Olivier Goffart
0071011ebf csync: remove CSYNC_PARAM_ERROR
It does not make sense to report such error to the user.
Its goal was to show invalid use of the csync API, but this is now done
with asserts.
2018-03-14 10:25:45 +01:00
Olivier Goffart
978a129eed csync: Simplify csync_walk_local_tree/csync_walk_remote_tree
Small refactoring
2018-03-14 10:25:45 +01:00
Christian Kamm
86b30e36c2 Merge remote-tracking branch 'origin/2.4' 2018-03-12 10:24:25 +01:00
Christian Kamm
427bb83f0d IssuesWidget: addItem performance improvement
Ensure adding a new item isn't usually O(n) by keeping track of which
items have associated issues.
2018-03-06 13:02:54 +01:00
Christian Kamm
faec059a9b IssuesWidget: Don't allow two issues for the same file/folder
This is intended to safeguard against invalidation bugs that cause the
same error to be added again for every sync run.
2018-03-06 13:02:54 +01:00
Christian Kamm
641eddfbdf INSTRUCTION_IGNORE now carries a direction
This allows IssuesWidget to selectively wipe only the 'Up' ignores
during selective local discovery.
2018-03-06 13:02:54 +01:00
Christian Kamm
61869bb65e ProtocolItem: Adjust the way data is stored again
The struct makes it easy to pack data and should consume less memory
overall.
2018-03-06 13:02:54 +01:00
Christian Kamm
797473ba1f SyncResult: Make sure the number of conflicts is correct #6226
If the SyncResult incorrectly believes that there are no conflicts, the
tray icon won't be correct and there will be no warning about unresolved
conflicts on the account.

Nevertheless, it's pretty awkward that the IssuesWidget is better
informed about pending conflicts than the Folder itself. This kind of
backwards data flow is very confusing.

Unfortunately the only alternative I see is to either keep track of
this information in two places (also in Folder), or create a common
data-holding class that can serve as a model instance for the issues
view as well as provide data directly to the Folder - which would
have been a much larger change.
2018-03-06 13:02:54 +01:00
Christian Kamm
f82d61ea19 SyncEngine: Make "local discovery?" question available
Also fix the minor bug that was mentioned and add tests.
2018-03-06 13:02:54 +01:00
Christian Kamm
ec281654ae Issues tab: Invalidate issues selectively #6226
Everything is invalidated later: after discovery, not before. In
addition entries that should only be invalidated when new local
discovery is done have that behavior now.
2018-03-06 13:02:54 +01:00
Christian Kamm
52dfe589ba ProgressInfo: Add information for local vs remote discovery 2018-03-06 13:02:54 +01:00
Christian Kamm
a5aebac6a7 slotFolderDiscovered: Fix 'local' always being false
It was unused, so no harm done.
2018-03-06 13:02:54 +01:00
Christian Kamm
13eb64584f Discovery: Error if properties are missing #6317 2018-03-06 13:01:53 +01:00
Olivier Goffart
7397565274 Propagator: remove a bunch of code related to the 'Shared' directory
This no longer exists since the owncloud server 7.0 which we no longer
allow to connect to
2018-03-01 14:48:00 +01:00
Olivier Goffart
4a19a8d644 ConnectionValidator: change the minimum server version
Forbit connection with server older than 7.0. These server did not have
permission.

Also warn for anything older than 9.1. 9.0 is end of life according to
https://github.com/owncloud/core/wiki/Maintenance-and-Release-Schedule
2018-03-01 14:48:00 +01:00
Olivier Goffart
302c60fe15 ConnectionValidator::Status use Q_ENUM
So no need to have a manual conversion to QString
This is only used in debug message anyway.
2018-02-26 16:11:46 +01:00
Olivier Goffart
22c7002d59 Move ClientProxy and ConnecitonValidator to gui
They are using the ConfigFile and are used to control
when to sync rather than for the sync itself
2018-02-26 16:11:46 +01:00
Olivier Goffart
9968142976 owncloudcmd: Do not overwrite the http timeout for json jobs
The AbstractNetworkJob already has a sensible timeout that depends
on an environment variable.
No need to overwrite that with some arbitrary value. (The connection
validator does that because it could cause problems if two connection
validator were to run at the same time. Not a problem here)
2018-02-26 16:11:46 +01:00
Olivier Goffart
75a6783a79 owncloudcmd: Do not read the proxy settings from the gui's config file
The proxy settings for the owncloudcmd client can be set via the
--httpproxy command line argument. owncloudcmd should not depends
on the gui's config
2018-02-26 16:11:46 +01:00
Olivier Goffart
18afe6a395 Folder: remove unused member 2018-02-26 16:11:46 +01:00
Olivier Goffart
f6331951eb cmake: Remove references of now unused WITH_TESTING
Issue #6318
2018-02-21 11:28:31 +01:00
Olivier Goffart
7897b386b6 Utility::fsCasePreserving: remove UNIT_TESTING ifdef
Since the release package will be build with unit test, we don't
want to query the env variable at every call to fsCasePreserving.
So only test the env variable at startup.
And the testutility can still change the value.

(The env variable is still used from t8.pl and maybe smashbox)

Issue #6318
2018-02-21 11:28:31 +01:00
Christian Kamm
48dd8ed6c2 Partial local discovery: Fix scheduling logic
A recent patch that touched the condition for deciding whether a
periodic full local discovery is necessary accidentally inverted the
condition.
2018-02-20 18:07:28 +01:00
Christian Kamm
33306dcc38 Set launch-on-startup when the first account is set up
The previous code would disable it when the second account was
configured.

See #6347
2018-02-20 11:20:52 +01:00
Christian Kamm
6fc3bfc265 Conflicts: Add user name to conflict file name #6325
For the case of uploading conflict files only.
2018-02-20 10:10:34 +01:00
Christian Kamm
129b814931 SyncEngine: Use separate state for two unicode conversions
It's unlikely that there were interaction effects but still seems safer
to use different conversion state for the path and rename_path.
2018-02-20 10:01:47 +01:00
Christian Kamm
6c1a73b67a SyncJournal: Clear etag filter before sync
Before, we only cleared the _avoidReadFromDbOnNextSyncFilter *after* a
sync which meant that we had to sync twice after selective sync setup.

Now, we clear the filter *before* a sync as well which allows the actual
next sync to write the correct etags to the db again - instead of only
the sync after that one.

Also expand on comments and rename _avoidReadFromDbOnNextSyncFilter to
_etagStorageFilter.
2018-02-16 11:39:19 +01:00
Christian Kamm
4a47f7e438 Merge remote-tracking branch 'origin/2.4' 2018-02-16 10:17:19 +01:00
Christian Kamm
73062e21a3 SyncJournal: Don't use LIKE with paths
Paths can contain the wildcards % and _ and that would lead to odd
behavior.

This patch also clarifies the behavior of avoidReadFromDbOnNextSync()
which previously dependend on whether "foo/bar" or "foo/bar/" was
passed as input.

Possibly affects #6322
2018-02-15 09:56:43 +01:00
Christian Kamm
e7e6584cab Sharing: Use maximum allowed permissions for new share #6346
The client already computed the valid permissions, there was just a typo
that meant we didn't end up using them.
2018-02-15 09:10:47 +01:00
Markus Goetz
13f1122c50 HTTP2: Only from Qt 5.9.4 #6285 2018-02-14 12:11:27 +01:00
Markus Goetz
b5e129aa6b Theme: Icon cache explanation 2018-02-12 17:11:58 +01:00
Markus Goetz
9fc175231d Notifications: Immediately request when getting account online 2018-02-12 09:01:00 +01:00
Markus Goetz
4dd0a75cce SettingsDialogMac: Also start timer for notifications 2018-02-12 09:01:00 +01:00
Christian Kamm
22b19636e9 Don't delete contents behind directory junctions #6322
QFileInfo::isSymLink() does detect reparse points that are symlinks but
returns false for junctions. The new function FileSystem::isJunction()
can detect those and is used to not recursively delete files inside
directories that are junctions.

See also https://bugreports.qt.io/browse/QTBUG-45344 and the
discussion in the PR https://codereview.qt-project.org/#/c/113019/.
2018-02-09 09:15:29 +01:00
Markus Goetz
7860876b54 libcrashreporter-qt: Update submodule 2018-02-07 15:31:42 +01:00
Markus Goetz
7eb2dc21af ServerNotificationHandler: Properly create "Dismiss" URL
Qt's JSON API is confusing, it doesn't convert to a string as one expects.
2018-02-06 20:28:00 +01:00
Markus Goetz
e338739d83 Fix compile for libcrashreporter-qt on macOS 2018-02-06 15:22:19 +01:00
Markus Goetz
cedf72825b NO_SHIBBOLETH: Fix warning 2018-02-02 19:47:26 +01:00
Olivier Goffart
e720f84005 owncloudcmd: Do not do the capability call when --nonshib is passed
https://github.com/owncloud/enterprise/issues/2391
2018-01-29 09:57:18 +01:00