Commit graph

1929 commits

Author SHA1 Message Date
Markus Goetz
70ff928381 CSync & statedb: Parse 'perm' from server
ownCloud 6 sends this.
2014-06-06 15:24:17 +02:00
Markus Goetz
b48ab79a92 CSync & statedb: Remove uid/gid
Columns are still in the DB as we don't want to break any compatibility.
2014-06-06 13:41:16 +02:00
Markus Goetz
fd4642d827 Folder: Don't add ignored files on startup
Before each sync is enough.
(We could do it at startup only, but so far it is good to have
it at each sync so we can easier see stuff in the log)
2014-06-05 17:50:18 +02:00
Daniel Molkentin
3934fa019e SocketAPI: proper name for pipe on windows 2014-06-05 12:02:57 +02:00
Daniel Molkentin
7fcf6f9f79 Merge branch '1.6' 2014-06-05 12:01:50 +02:00
Olivier Goffart
7a7b0e8939 propagator: Ignore new directory inside removed directory.
This fixes te bug if one create a tree of folders and subfolders
and delete them while they are uploading. Some folder would
reappears
2014-06-04 16:37:46 +02:00
Olivier Goffart
a4f6370774 propagator: do not update perent directory etag before sub directories are removed
Direcotries are removed at the end, and we don't want to update
parent directory etag before the delete is performed, or the next
sync may read from db and think the files are not removed.

Issue #1845
2014-06-04 12:31:30 +02:00
Markus Goetz
233450d850 CSync: Remove config dir setting 2014-06-04 10:56:56 +02:00
Olivier Goffart
582a8fe7fd Merge branch '1.6' 2014-06-03 17:27:12 +02:00
Olivier Goffart
abafbef985 Optimize move
Do not send the mtime for each file without a directory, because the server now keeps it
2014-06-03 17:27:06 +02:00
Olivier Goffart
6e10b8c5c4 Propagator: Recover from 'precondition failed' error
When we detect a precondition failed, it is possible that it is
because the etag in the database is wrong.  We must therefore not
read from the database on the next sync.  In order to avoid that, we
reset the etag of parent directories to invalid values

Fixes #1767
2014-06-03 17:22:40 +02:00
Olivier Goffart
24616bead4 Fix syncing a folder with '#' in the name
Or an url with '#'

Fixes #1838

The problem is a bug fixed in Qt5 now breaks.
In Qt4, QUrl::setPath() did not properly handle path with '#' in them
and QUrl::toString would restitute the '#'.

But csync will blindly do  "uri + path" before passing the path to
VIO.  because csync_update has no idea that the VIO plugin need special
encoding, the encoding cannot be done there.  But csync_owncloud then
encodes the full path.  So if the uri contains '#', it must not be already
encoded or there will be two encoding.
2014-06-03 15:45:10 +02:00
Markus Goetz
4d4eab8b1c CSync & Propagator: Support a direct download URL
This is for server file backends that support sending a
direct URL.
2014-06-03 14:55:34 +02:00
Markus Goetz
b8e20b412c CSync: We can access the context directly 2014-06-03 11:51:12 +02:00
Markus Goetz
5ee00a8df7 CSync: Simplify csync_owncloud stat/resource handling 2014-06-03 11:51:12 +02:00
Klaas Freitag
1af3d3f18b More descriptive error message when querying the database without hit. 2014-06-03 09:50:09 +02:00
Klaas Freitag
f54248c0a7 Minor cleanups and changes 2014-06-03 09:50:09 +02:00
Klaas Freitag
2911c0e1c4 Add a recursiveFolderStatus method 2014-06-03 09:50:09 +02:00
Daniel Molkentin
746c15b4aa Remove debug layout 2014-06-02 19:38:04 +02:00
Markus Goetz
022a3fcd92 OS X: Fix localFileNameClash
We need to compare the other way round and compare only the file name
because our sync directory might be symlinked and then resolve to
another canonical path (but we were only interested in the filename part
anyway)
2014-05-30 15:47:53 +02:00
Olivier Goffart
0151682a53 Make sure that OwncloudPropgator::finished is only emit once
When we abort, each job currently running may result in a call to finished().
It used to cause a crash because we would unlock the _syncMutex twice

Fixes #1793
2014-05-29 12:15:13 +02:00
Olivier Goffart
864f2cdc7d remove the _syncMutex and replace it by a simple bool 2014-05-29 11:35:13 +02:00
Daniel Molkentin
0c1ab533e6 Do not trim serial numbers
This broke in a refactoring. The 'true' was interpreted as length of 1.

Fixes part of #1436
2014-05-28 21:16:00 +02:00
Olivier Goffart
1dd7f736d0 Fix another crash at exit
Fixes #1794
2014-05-28 19:59:35 +02:00
Olivier Goffart
571c199db8 remove broken connection
Fixes #1822
2014-05-28 18:11:39 +02:00
Daniel Molkentin
3d2a2df86f Allow to set a smaller timeout value in the config file
Added to debug #1724
2014-05-28 16:28:22 +02:00
Olivier Goffart
ebe1f986f1 Only remove session cookies
This should disconnect without loosing long lived cookie
2014-05-28 15:24:14 +02:00
Olivier Goffart
dd1152dd4f Clear all cookies when loging out 2014-05-28 11:41:06 +02:00
Daniel Molkentin
f591ac6549 CookieJar: Reduce debug noise 2014-05-28 10:05:32 +02:00
Klaas Freitag
e275ad3866 Emit the sync finished signal a bit delayed.
This allows folder watcher events comnig in before the sync is marked
finished. This avoids "endless syncing" as described in bug #1808
2014-05-27 11:35:07 +02:00
Olivier Goffart
5813f63df8 Do not runs the check connection timer when there is no configured account
in order to avoid popup of the wizzard every 32 seconds

Fixes #1812
2014-05-27 11:05:09 +02:00
Klaas Freitag
449c00f019 No need to check for case preserving filesystem here.
That is done in the utility function instead.
2014-05-26 18:28:52 +02:00
Klaas Freitag
6017eb7ca6 Case clash check for local remove plus native separators. 2014-05-26 18:28:25 +02:00
Klaas Freitag
f1b2417967 Add check for case clash for legacy propagator download. 2014-05-26 18:28:25 +02:00
Klaas Freitag
181383e5f1 Check for case preserving file system in localCaseClash 2014-05-26 18:28:25 +02:00
Markus Goetz
c1b9d5c653 Propagator: Implement localFileNameClash for OS X 2014-05-26 17:36:52 +02:00
Klaas Freitag
964c3ac7bf Check for local file name clash before local renaming.
Return a proper error message in case.
2014-05-26 17:00:40 +02:00
Daniel Molkentin
6d8afabf41 Find export macro 2014-05-26 16:33:04 +02:00
Daniel Molkentin
0a7dbeb778 Export CookieJar 2014-05-26 16:29:26 +02:00
Olivier Goffart
81f410970f ammend previous change 2014-05-26 15:01:26 +02:00
Olivier Goffart
e75c5236f2 Properly report errors when renaming a file
That is especially usefull when renaming to an existing file with a different case
2014-05-26 14:51:53 +02:00
Olivier Goffart
8a671c40d1 Make FolderMan a member of the application
The goal here is that it is going to be destroyed with the application
It need to be destoyed so the folder are destroyed, which is required
for properly finishing the sync while exiting.

It must not be destroyed after the application because the QSQLite plugin
may be already destroyed in that case.

Since the constructor of FolderMan is called earlier, we can't call the
config file too early

 fixes 1793
2014-05-26 14:37:15 +02:00
Olivier Goffart
50ce0f9681 Fix crash at exit when there is a log after the Logger has been destroyed
Use a proper static Logger instead of allocating one,  and cleanup
the QTMessageLogger when it is destroyed
2014-05-26 14:37:14 +02:00
Daniel Molkentin
a60902b33d Make sure the settings window is brought up when minimized
Fixes #1804
2014-05-26 14:32:08 +02:00
Olivier Goffart
5220786cf2 do not blacklist fatal error 2014-05-26 12:27:16 +02:00
Olivier Goffart
99cead68f5 Fix crash when aborting
When aborting, the slotFinished will destroy all the Jobs, but they need
one more even loop to finish cleanups

Fixes #1793
2014-05-26 12:23:25 +02:00
Olivier Goffart
7a209ba376 leak fix 2014-05-26 12:07:00 +02:00
Olivier Goffart
f9263da3de Fix crash when the account config is gone and there are still folder
In rare case (due to a bug in QSettings) the account config may disapear
We should not crash in that case
2014-05-26 11:08:32 +02:00
Daniel Molkentin
3f724e1c6a Fix Pref window for good
This was forgotten in 18677dbc3f
2014-05-26 09:37:43 +02:00
Volkan Gezer
9abffdb1a6 fix typo 2014-05-24 15:04:42 +02:00
Volkan Gezer
5b0307446a fix spacing 2014-05-24 15:03:45 +02:00
Klaas Freitag
1b2875c20a Use the moved implementation of the name clash detection method. 2014-05-23 18:58:21 +02:00
Klaas Freitag
bbdf7bf955 Check for case clash on downloads. 2014-05-23 18:58:21 +02:00
Klaas Freitag
57359968ed Added method localFileNameClash
Also reordered the implementations a bit.
2014-05-23 18:58:08 +02:00
Klaas Freitag
ea9f302b7a Read the blacklist entries case insensitive in case the file
system is only case preserving.
2014-05-23 16:13:35 +02:00
Klaas Freitag
ef0a3c212e Add a utility function fsCasePreserving.
Returns true if the underlying file system is case preserving instead
of case sensitive. That is true for Mac and Windows currently. Only
Linux has a case sensitive file system usually.
2014-05-23 16:13:35 +02:00
Daniel Molkentin
18677dbc3f Fix on-top/below-others window problem
- Don't give the settings window an always-on-top hint, or else
  sub dialogs will pop-under. Also, people seem to (ab-)use it
  as a status monitor... well

- raiseWidget() can only really do one thing: remove the dialog status
  from dialogs without a parent due to a bug in Qt. The previous
  implementation never really worked. Tested on Mac and Gnome 3 so far.

Fixes #1795
Fixes parts of #1775
2014-05-23 16:00:50 +02:00
Klaas Freitag
7e8b403116 More progress on the CI problem detection. 2014-05-22 17:12:59 +02:00
Daniel Molkentin
b995cd318c Fix/cleanup PropagateLocalMkDir::start() 2014-05-22 10:16:33 +02:00
Daniel Molkentin
ed19107161 Remove useless check. QFile::exists() is CI on CI filesystems
Tested on OS X and Windows
2014-05-22 10:06:10 +02:00
Daniel Molkentin
5b298abba1 Revert "Set an "active" role for the menubar icon on Mac"
Apart from a small mistake in this commit, there seems to be
something else wrong.

This reverts commit 97362cff32.
2014-05-21 13:00:20 +02:00
Daniel Molkentin
4edbeece49 Fix connection following the update of the QtSingleApplication classes 2014-05-21 12:31:44 +02:00
Daniel Molkentin
97362cff32 Set an "active" role for the menubar icon on Mac
Fixes #1730
2014-05-21 11:19:38 +02:00
Daniel Molkentin
3db3c7b876 Update QtSingleApplication and QtLockedFile
Fixes stale temp file issues, and is needed for blocking support.
2014-05-21 11:19:38 +02:00
Klaas Freitag
d0b9b002e4 Show the sync icon in case the status is not yet defined.
This fixes the problem that on the first sync, no proper status icon is
shown on a potential long update phase.
2014-05-21 11:09:01 +02:00
Olivier Goffart
bdba56f60b Always wait on the thread before emiting finished
This ensure that there would be no way to have two thread running

Refactor all the location where finished is called in a single function
2014-05-20 12:32:06 +02:00
Daniel Molkentin
7ade4bb6e6 AccountSettings: Handle button states more correctly
Fixes #1779
2014-05-19 15:46:23 +02:00
Daniel Molkentin
86117aed0d autostart unix impl: use mkpath instead of mkdir
Fixes TestUtility::testLaunchOnStartup(), if .config/ does not exist.
2014-05-19 12:42:04 +02:00
Klaas Freitag
43fe7b0d55 Detect directory case sensitivity clash on windows 2014-05-16 15:24:01 +02:00
Olivier Goffart
e1f8eb5aa5 Another way to force a sync when choosing 'Keep files' 2014-05-15 19:36:01 +02:00
Olivier Goffart
f40a054cb7 Revert "Re-sync immediatly after "Keep files" when all files were removed"
This causes infinite sync loops

This reverts commit 8b469d3992.
2014-05-15 19:29:40 +02:00
Daniel Molkentin
81c768099e Folder: Correctly reflect paused state after restart 2014-05-15 15:04:48 +02:00
Olivier Goffart
8b469d3992 Re-sync immediatly after "Keep files" when all files were removed
Fixes #1710
2014-05-15 11:48:01 +02:00
Olivier Goffart
bb929db7e6 fix warning 2014-05-15 11:29:23 +02:00
Olivier Goffart
90ee274744 We need to call csync_commit in every error cases
Else there will still be outdated tree in the memory and the further sync
will be confused

Relates to #1710
2014-05-15 11:18:06 +02:00
Klaas Freitag
ef44a59bed Better debugability. 2014-05-15 09:45:50 +02:00
Klaas Freitag
d96139f698 Commented verbose logging. 2014-05-15 09:45:50 +02:00
Daniel Molkentin
de970eb0a5 Fix wizard flow with shibboleth 2014-05-15 09:43:26 +02:00
Daniel Molkentin
17a2e224c4 Fix memleak 2014-05-14 12:53:12 +02:00
Daniel Molkentin
5ed4710d64 Merge pull request #1726 from owncloud/debian_bsd
Make Debian GNU/kFreeBSD compile
2014-05-14 12:20:17 +02:00
Klaas Freitag
5493c22584 Do not dispatch invalid progress information to avoid "unknown" messages 2014-05-14 11:52:22 +02:00
Klaas Freitag
64f4d1b387 Removed block parameter from terminateSync.
Do not pretend to immediately terminate the sync but let csync
finish planfully and free the mutex.
2014-05-14 11:52:22 +02:00
Daniel Molkentin
cdd8c8165b Add missing header to fix Qt5 compilation 2014-05-14 11:22:56 +02:00
Daniel Molkentin
ba959f7cf9 CookieJar refactoring required to overcome issues in Shibboleth support
The shibboleth implementation no longer maintains its own QNAM.

Instead, MirallAccessManager now holds a custom QNAM implementation
which saves cookies to a file on disk.

This patch also reduces some complexity wrt the browser window,
which used to be deleted via a roundtrip to its callee, which
is not longer required.

Fixes #1764 and Enterprise bug #165

Going forward, AbstractCredentials::getQNAM() could maybe removed entirely.
2014-05-14 11:11:45 +02:00
hefee
07f57b1982 make Debian GNU/kFreeBSD compile 2014-05-13 16:51:42 +02:00
Olivier Goffart
091e9bbd52 Fix crash when _engine is not available
Fixes #1671 and #1675
2014-05-07 16:17:08 +02:00
Olivier Goffart
ce09e11011 Revert "Do not dereference the _engine member variable without check."
bubbleUpSyncResult is only called from slotSyncFinished, so if _engine
is invalid there, it is also invalid in slotSyncFinished

This reverts commit aee7515d42.
2014-05-07 16:13:43 +02:00
Olivier Goffart
f034bcb9ae only increment the progressbar for files when the file has been fully transfered 2014-05-07 12:35:02 +02:00
Klaas Freitag
a50c39cd0c Maintain the original inode value for renamed files.
In case two renames are done on the same file/folder very quickly we
lost the information that the second operation was also a rename. That
was because we tried to get the inode value from a stat on the file once
the first rename was finished. But at that point, the file was already
gone because of the second rename.

Now the original inode is kept and written to db in case the file can
not be stat'ed.

This fixes bug #1737
2014-05-06 12:55:54 +02:00
Klaas Freitag
370dd99e47 Super useful source comment. 2014-05-06 09:30:50 +02:00
Olivier Goffart
1631cfdaf1 Fix not blacklisting error 5xx 2014-05-02 17:26:28 +02:00
Olivier Goffart
2e76fe87c2 Fix reporting the right error in a GET
We always reported the lack of e-tag instead of the real error
2014-05-02 17:26:28 +02:00
Markus Goetz
6c44f53645 Set network timeout to 300 sec
As per previously used values (see source and changelog)
2014-05-02 15:35:40 +02:00
Olivier Goffart
988c162d2f Have only one place where we read the timeout 2014-05-02 13:04:53 +02:00
Olivier Goffart
88cb047197 Add a timeout when using the QNAM propagation 2014-04-30 18:17:49 +02:00
Klaas Freitag
7f7154ed40 Auto generate the Export header.
This should fix oem builds.
2014-04-30 13:55:40 +02:00
Klaas Freitag
df8b5b1ea6 Removed unused Q_OBJECT 2014-04-30 13:55:40 +02:00
Olivier Goffart
ce50cdecf1 Add one byte per files in the computation of the progress bar
So it feels like the progress bar is moving when operating of file
that are empty or when deleting or renaming files
2014-04-30 13:20:20 +02:00
Olivier Goffart
77c7439329 Don't include the directory size in the overall progress
We don't include them in the total amout of files so it should
not be included in the progress either.

Also, for some reasons directories seems to be 16kB on windows
2014-04-30 12:57:30 +02:00
Markus Goetz
925c6485e6 Propagator: Dont show silly string for non-error 2014-04-30 11:36:57 +02:00