Commit Graph
100 Commits
Author SHA1 Message Date
Christian KammandKevin Ottens 039d885b76 LogDir: Compress last logfile on restart
For #7353
2020-07-01 15:13:20 +02:00
Christian KammandMichael Schuster a704cca090 Windows: Fix context menu handling only own verbs #7004
Previously it'd handle all verbs as if they were our own.

Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-03-03 18:56:09 +01:00
Christian KammandCamila San 4bd2545dad Windows: Release handle/fd when file open fails #6699 2018-09-10 21:17:20 +02:00
Christian KammandCamila San f4dfdf5889 nautilus: Fix GET_MENU_ITEMS with utf8 filenames #6643 2018-09-10 21:06:57 +02:00
Christian KammandCamila San 5b228d1afd Do not require server replies to contain an mtime
The check was added for #6317 in commit
13eb64584f.

We did see missing mtimes in replies in tests with live servers though.
Possibly those were old incomplete responses cached in the stat cache?
2018-09-10 17:33:53 +02:00
Christian KammandCamila San 3ec4fc6145 Update: Report on readdir() errors #6610 2018-09-10 14:33:36 +02:00
Christian KammandCamila San 283c4b13a1 Log: Adjust update/reconcile log verbosity
Not having these enabled by default is causing significant extra back
and forth with reporters since they must manually use --logdebug for the
log to be useful.
2018-09-09 21:34:41 +02:00
Christian KammandCamila San ce3339a00f fixup: remove outdated Qt5.5 workaround code 2018-09-09 17:27:30 +02:00
Christian KammandCamila San 14df7a3273 fixup: use initializer for contextMenuVisibleManual 2018-09-09 17:23:49 +02:00
Christian KammandCamila San 9330d2b178 fixup: make logging "info" 2018-09-09 17:15:58 +02:00
Christian KammandCamila San 87dd198b52 Tray workarounds #6545
* Disentangle the previous 'qdbusWorkarounds' into three different
  things
* Make not trusting tray.isVisible() a new workaround
* Introduce env vars for all workaround flags
* Use the workaround flags for OSX
* Determine workaround flags for KDE when the plasma integration plugin
  is missing
2018-09-09 13:17:31 +02:00
Christian KammandCamila San cba0627a9c Ensure GETFileJob notices finishing #6581
It could happen that readyRead was emitted for incoming data while the
download was not yet finished. Then the network job could finish with
no more data arriving - so readyRead wasn't emitted again.

To fix this, the finished signal also gets connected to the readyRead
slot.
2018-09-09 11:50:00 +02:00
Christian KammandCamila San 2844c925eb Show a tray message when a folder watcher becomes unreliable #6119 2018-08-28 17:04:25 +02:00
Christian KammandRoeland Jago Douma 4fa6fff1a9 Doc: Explaining conflict files and resolving them #6396 2018-07-03 10:18:20 +02:00
Christian KammandRoeland Jago Douma d549c77af6 Issues: Show link to conflicts doc if there are some #6396
The link url is themed.
2018-07-03 10:18:18 +02:00
Christian KammandRoeland Jago Douma 70b5d54082 Proxy settings: Fix bad behavior with empty host
Fixes f6a075ef54 for #5885

When no host is given it shouldn't just *appear* that there is no
proxy, there actually shouldn't be a proxy set then.
2018-07-02 21:15:30 +02:00
Christian KammandRoeland Jago Douma ca8f569371 SocketAPI: Remove SHARE_STATUS
It was never used by a shell integration.
2018-06-11 19:35:17 +02:00
Christian KammandRoeland Jago Douma 2bec587d4d SocketAPI: Allow opening share dialog if contents still syncing #4608
With the previous changes the "Share..." action was shown but it didn't
work yet.
2018-06-11 19:35:16 +02:00
Christian KammandRoeland Jago Douma 16ba0cf47e Blacklist: Add unittest #6411 2018-06-11 14:50:01 +02:00
Christian KammandRoeland Jago Douma d304fcbda7 Rename local discovery option for clarity
It's using full relative filepaths, not just dir paths.
2018-06-11 14:50:01 +02:00
Christian KammandRoeland Jago Douma 77fcff5bdf Conflicts: Change tags to be more user friendly #6365
From "_conflict-user-yyyymmdd-hhmmss"
to   " (conflicted copy user yyyy-mm-dd hhmmss)"
2018-06-11 14:40:40 +02:00
Christian KammandRoeland Jago Douma e65caee9cf Notify if an explicitly excluded folder is created #6222 2018-06-08 14:49:26 +02:00
Christian KammandRoeland Jago Douma a1d6af60f0 AccountWizard: Reserve space for error label #6546 2018-06-07 15:32:52 +02:00
Christian KammandRoeland Jago Douma 8147963b24 SyncJournal: Explain added file-exists check 2018-06-07 09:50:09 +02:00
Christian KammandRoeland Jago Douma cc04ce9fe4 SyncJournal: Check file existence even for open dbs #6049
With WAL mode sqlite seems to occasionally crash when the
underlying filesystem goes away.
2018-06-07 09:50:09 +02:00
Christian KammandRoeland Jago Douma 5f793c151c Upload: Adjust timeout for final job based on size #6527
Some servers have virus scanners and the like that can delay the
response of the final chunked upload assembly significantly, often
breaking the current 5min (!) timeout. See owncloud/enterprise#2480
for details.
2018-06-07 09:38:16 +02:00
Christian KammandRoeland Jago Douma 4fa762b5ce Propagation: Connection closed is a normal error #6516
Because it sometimes appears in conjunction with server bugs and we
don't want to halt all syncing for other files in these cases.
2018-06-07 09:12:46 +02:00
Christian KammandRoeland Jago Douma 3556482bce TestChunkingNG: Remove unneeded test code 2018-06-07 08:53:12 +02:00
Christian KammandRoeland Jago Douma d9640dd79e PropagateUpload: Fix miscount in abort() #6516
Previously it tried to abort even jobs that had already finished, which
was not going to work as they wouldn't emit finished() again.

Also, in some cases the abortCount would never go to zero and that case
wasn't well documented.
2018-06-07 08:53:12 +02:00
Christian KammandRoeland Jago Douma 96126a53d3 PropagateUpload: Remove unused PropagateUploadFileCommon::abort 2018-06-07 08:53:10 +02:00
Christian KammandCamila San 797b40237e 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-06-06 22:49:50 +02:00
Christian KammandRoeland Jago Douma 898a530ba5 ShareLink: Preserve password when unrelated ui changes #6512 2018-06-06 20:56:34 +02:00
Christian KammandRoeland Jago Douma e1ab5f3811 Network settings: If no proxy host given, show "no proxy" #5885
What happens internally is that a proxy without a hostname gets treated
as no proxy.
2018-06-06 20:11:09 +02:00
Christian KammandRoeland Jago Douma de9fb7dc9a Silence warning by removing unnecessary this capture 2018-06-06 09:15:25 +02:00
Christian KammandRoeland Jago Douma 550b845037 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-06-06 09:15:23 +02:00
Christian KammandRoeland Jago Douma 4a81ae75cf Logging: Add persistent auto-logdir option #6442 2018-06-05 20:07:53 +02:00
Christian KammandRoeland Jago Douma 428cfc5e1c LogDir: Compress log when switching files #6442 2018-06-05 20:07:53 +02:00
Christian KammandRoeland Jago Douma 9319b6594e LogDir: Go to new file on Problem/Abort too #6442 2018-06-05 20:07:53 +02:00
Christian KammandRoeland Jago Douma 63c2474b70 Folders: Use "Problem" icon for unresolved conflicts #6277 2018-06-05 19:59:19 +02:00
Christian KammandRoeland Jago Douma ed5e413751 Share link: Update permission wording #6192 2018-06-05 19:46:04 +02:00
Christian KammandCamila San 09f83f4fa9 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-06-05 12:00:20 +02:00
Christian KammandRoeland Jago Douma c57e4dcf03 Blacklisting must prevent parent etag updates #6411 2018-06-05 10:12:11 +02:00
Christian KammandCamila San 70f0792d4a Nautilus shell integration: Print python version on startup #6406 2018-06-01 13:02:13 +02:00
Christian KammandCamila San 629b14266b Nautilus integration: Not a ColumnProvider
The nautilus plugin doesn't actually define get_columns(), so pretending
to be a ColumnProvider lead to a critical warning on startup.
2018-05-17 20:52:40 +02:00
Christian KammandCamila San a2675b559b Upload: Simplify 'finished' flag
* Sometimes there was 'finished' and '_finished'
* Make each done() call automatically set _finished to true
2018-05-16 20:57:26 +02:00
Christian KammandCamila San 5f7fd7c551 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-05-16 20:29:12 +02:00
Christian KammandCamila San 1868b2f3ec IssuesWidget: addItem performance improvement
Ensure adding a new item isn't usually O(n) by keeping track of which
items have associated issues.
2018-05-16 16:49:41 +02:00
Christian KammandCamila San a0d7095b2c 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-05-16 16:49:03 +02:00
Christian KammandCamila San a0d5e31423 INSTRUCTION_IGNORE now carries a direction
This allows IssuesWidget to selectively wipe only the 'Up' ignores
during selective local discovery.
2018-05-16 16:48:31 +02:00
Christian KammandCamila San 11b6b48c75 ProtocolItem: Adjust the way data is stored again
The struct makes it easy to pack data and should consume less memory
overall.
2018-05-16 16:48:06 +02:00
Christian KammandCamila San 800f1ace0c 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-05-16 16:47:27 +02:00
Christian KammandCamila San 75194d1821 SyncEngine: Make "local discovery?" question available
Also fix the minor bug that was mentioned and add tests.
2018-05-16 16:46:40 +02:00
Christian KammandCamila San 2defaf099d 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-05-16 16:45:39 +02:00
Christian KammandCamila San 01f83ff398 ProgressInfo: Add information for local vs remote discovery 2018-05-16 16:45:13 +02:00
Christian KammandCamila San 8077748c9d slotFolderDiscovered: Fix 'local' always being false
It was unused, so no harm done.
2018-05-16 16:44:36 +02:00
Christian KammandCamila San 687b6f5655 Discovery: Error if properties are missing #6317 2018-05-16 16:42:20 +02:00
Christian KammandCamila San 583399ad53 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-05-15 22:59:16 +02:00
Christian KammandCamila San ea142b8018 Conflicts with user name: Fix tests 2018-05-15 22:54:48 +02:00
Christian KammandCamila San f244cc4d4a 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-05-15 22:44:10 +02:00
Christian KammandCamila San 17d174e6fa Conflicts: Add user name to conflict file name #6325
For the case of uploading conflict files only.
2018-05-15 22:38:35 +02:00
Christian KammandCamila San ce0e2d0b88 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-05-15 19:44:00 +02:00
Christian KammandCamila San 7154a001d6 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-05-15 19:26:40 +02:00
Christian KammandCamila San 2d1d651fcd 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-05-15 18:42:44 +02:00
Christian KammandCamila San 1fa88c9820 FolderStatusModel: Refresh folders on Problem sync #6337
We don't want to refresh too frequently. But Problem is very close to
Success and very common.
2018-05-15 18:08:17 +02:00
Christian KammandCamila San ad750f569c Tray: Change icon for unresolved conflicts #6277 2018-05-15 17:58:10 +02:00
Christian KammandOlivier Goffart ebfac84c69 Shell integration: Make nautilus work with multiselections
Previously no menu would ever be shown if more than one file is
selected. Now the GET_MENU_ITEMS command is sent with all selected files
as an argument - similar to what is done for the dolphin integration.
2018-01-23 14:02:56 +01:00
Christian KammandOlivier Goffart 3c2622d2de Shell integration: Update nautilus for GET_MENU_ITEMS 2018-01-23 14:02:56 +01:00
Christian KammandOlivier Goffart 72363155d8 Nautilus integration: Work with python2 and python3 2018-01-23 12:30:58 +01:00
Christian Kamm 59f2e0634e Protocol: Correct sorting by size #6326
Previously we were sorting by size string, where
"6 MB" < "3 KB".
2018-01-23 12:02:16 +01:00
Christian Kamm 32bb1e6763 ProtocolItem: Use accessors over magic numbers 2018-01-23 12:02:16 +01:00
Christian Kamm 497b327d43 ShareLinkWidget: Remove outdated signal connection
Also convert the others to the new syntax to avoid similar errors in the
future.
2018-01-23 12:01:22 +01:00
Christian Kamm d831369f86 Protocol: Remove entries for auto resolved conflicts #6316 2018-01-23 12:01:22 +01:00
Christian Kamm e2b89c5afe TextXmlParse: Add truncated-xml testcase #6317 2018-01-22 14:05:08 +01:00
Christian Kamm b9c7aa8df3 Sync: Deal with file/folder conflicts #6312
Previously conflicts with a different type on both ends lead to sync
errors. Now they are handled in the expected way: the local item gets
renamed and the remote item gets propagated downwards.

This also adds a unittest for the TYPE_CHANGE case. That one looks like
parts of it might be unified with CONFLICT cases.
2018-01-19 09:47:49 +01:00
Christian Kamm c1b5412c16 Exclude regex: Use named captures
My benchmarks show no performance difference.
2018-01-18 10:24:24 +01:00
Christian Kamm 4337e8532e Exclude matching: Speedup the full-path traversal case
Previously we'd use the full regex when the bname triggered a full-path
matching to take place. Now we have a simplified full-traversal regex
for this case that can be significantly faster to apply.

Triggered by #5017 but doesn't actually solve it.
2018-01-17 15:05:50 +01:00
Christian Kamm a8a6f82270 Link shares: Change default share name #6298
There's a 64 character limit and we don't want to accidentally exceed
it.

Eventually there might be server API for default share name generation.

See owncloud/core#29913
2018-01-17 15:03:11 +01:00
Christian Kamm 7d70f1becb Ignore files that can't be encoded for the filesystem
There's an upstream bug where QTextCodec::canEncode returns true even
though it should be false. This works around that issue and adds a test.

The original work was done in 72809ef5b1

See #6287, #5676, #5719
See https://bugreports.qt.io/browse/QTBUG-6925
2018-01-10 13:36:00 +01:00
Christian Kamm cdd8d10940 Fix resizing crash when currentPage() is null
Sentry:
https://sentry.io/owncloud/desktop-win-and-mac/issues/425331770/
2018-01-09 13:54:11 +01:00
Christian Kamm 883deb1c5d Fix potential crash in Composite job destruction
Sentry:
https://sentry.io/owncloud/desktop-win-and-mac/issues/427476987/
2018-01-09 13:53:57 +01:00
Christian Kamm e389fcaecb Avatars: Use old location for servers <10 #6279 2018-01-09 11:34:56 +01:00
Christian Kamm 585d2b20bd Exclude regex: Restore old matching on Windows #6245
Unfortunately matching behaved differently on Windows. This patch
restores the previous matching behavior but still uses the new regular
expression based matching.

Further work will hopefully unify the behavior between platforms without
breaking backwards compatibility.
2018-01-09 11:09:05 +01:00
Christian Kamm 51b662fdfe Minor logging additions
- Clearly mark local and remote discovery start, to make this searchable
even without --logdebug.
- Promote two messages from debug to info: The 'N entries read from db'
message is useful and the 'read from db but ignored' message is rare
and surprising - if there's a bug there we want to see what happened in
the logs.
2018-01-08 09:36:30 +01:00
Christian Kamm 81baebf113 owncloudcmd: Set proxy earlier #6281
In particular before the capability call.

Also warn if no proxy is set because the command line doesn't follow the
strict format requirements.

(cherry picked from commit d0e7f61db6)
2018-01-05 10:26:55 +01:00
Christian Kamm f7c884d4d1 owncloudcmd: Remove some dead code
(cherry picked from commit 0f8790d993)
2018-01-05 10:26:53 +01:00
Christian Kamm d0e7f61db6 owncloudcmd: Set proxy earlier #6281
In particular before the capability call.

Also warn if no proxy is set because the command line doesn't follow the
strict format requirements.
2018-01-05 10:23:29 +01:00
Christian Kamm 0f8790d993 owncloudcmd: Remove some dead code 2018-01-05 10:12:25 +01:00
Christian Kamm 86377aa37a Folder: Remove unused 'dirty proxy' setting 2018-01-05 09:44:20 +01:00
Christian Kamm 3988f3ad77 GCC: Fix implicit-fallthrough warnings 2018-01-05 09:43:53 +01:00
Christian Kamm 7aa9af08c3 Issues: Speed up insertion and add hard upper limit #6272
Since sorting was enabled permanenty the list would be resorted with
each inserted issue. When inserting thousands of ignored files that
would make the whole ui freeze up.

Instead, sorting is disabled for inserts now and is reenabled after some
time has passed. That way users usually see the sorted view without the
lockups. Also, there's now a maximum of 50k issue entries.
2018-01-05 08:44:27 +01:00
Christian Kamm ab9d6285c6 Proxy: Hostname validation and reconnection on setting change
Where 'validation' currently just means "check whether it's empty".

Code adapted from wiggiBe's original PR #6140
2018-01-04 14:30:24 +01:00
Christian Kamm 83e94c3ec7 Fix compile after rebase 2017-12-15 18:05:44 +01:00
Christian Kamm a7c0cfc8eb Upload conflict files #4557
If the server has the 'uploadConflictFiles' capability conflict
files will be uploaded instead of ignored.

Uploaded conflict files have the following headers set during upload
  OC-Conflict: 1
  OC-ConflictBaseFileId: 172489174instanceid
  OC-ConflictBaseMtime: 1235789213
  OC-ConflictBaseEtag: myetag
when the data is available. Downloads accept the same headers in return
when downloading a conflict file.

In the absence of server support clients will identify conflict files
through the file name pattern and attempt to deduce the base fileid.
Base etag and mtime can't be deduced though.

The upload job for a new conflict file will be triggered directly from
the job that created the conflict file now. No second sync run is
necessary anymore.

This commit does not yet introduce a 'username' like identifier that
automatically gets added to conflict file filenames (to name the files
foo_conflict-Fred-1345.txt instead of just foo_conflict-1345.txt).
2017-12-15 18:03:53 +01:00
Christian Kamm 7ae8ba35de Remove unused csync test file
Now found at
test/csync/csync_tests/check_csync_update.cpp
2017-12-15 18:02:04 +01:00
Christian Kamm 8eebc53728 Unify item type enum
Previously, there was csync_ftw_type_e and SyncFileItem::Type. Having
two enums lead to a bug where Type::Unknown == Type::File that went
unnoticed for a good while.

This patch keeps only a single enum.
2017-12-15 18:02:04 +01:00
Christian Kamm 298f1ab570 Disable stack protection for mingw win32 builds in 2.4
Mingw builds could have it enabled! But we need to ship libssp and test
this more. For the upcoming 2.4 release it should be disabled.
2017-12-15 09:16:59 +01:00
Christian Kamm d870729709 Require Qt >= 5.6 #6241 2017-12-14 11:31:30 +01:00
Christian Kamm f40cceaf04 Share link: Adjust design of folder sharing permissions #6192 2017-12-14 08:34:44 +01:00
Christian Kamm e5ed8fc90a Merge remote-tracking branch 'origin/2.4' 2017-12-13 11:03:24 +01:00
Christian Kamm dcf0baa9de Journal: 64bit inodes, fix storing uint64s generally
In addition to using the right function when retrieving inodes this
*also* fixes a more general bug ownsql had with storing uint64 values
that didn't fit into an int64.
2017-12-12 10:30:54 +01:00