Commit graph

2219 commits

Author SHA1 Message Date
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
Daniel Molkentin
7e65c9741e [Shib] Ensure only one fetch job can open the browser 2014-06-02 17:41:49 +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
Eran
cd82a8585a change the text to be a little more descriptive and use shorthand in the context menu 2014-05-29 00:09:02 +03: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
Daniel Molkentin
86a48b52e9 Shib: Show a notification whenever the shib session times out
This is designed as a passive popup notification so that it will
not surprise or annoy the users.

Fixes Enterprise issue #179
2014-05-28 15:25:43 +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
Eran
6927fc80c3 change the mapping to use short hand and also made the mapping logic a little losser 2014-05-28 13:09:30 +03:00
Olivier Goffart
dd1152dd4f Clear all cookies when loging out 2014-05-28 11:41:06 +02:00
Olivier Goffart
ce9bfd319a Fix the sib window re-appearing.
When the windows is accepted, do not emit fetched which means the process is finished
one must first check the username is valid
2014-05-28 10:18:57 +02:00
Daniel Molkentin
f591ac6549 CookieJar: Reduce debug noise 2014-05-28 10:05:32 +02:00
Daniel Molkentin
4fd368c992 ShibCredentials: Ensure that _stillValid is not reset while the browser window is open
This will cause the browser window to open again after it has been told to close
if a network job has run in the background while the browser window was visible.

Fixes #1814
2014-05-28 10:05:32 +02:00
Eran
89a95d6445 fixed comment spelling 2014-05-28 08:28:03 +03: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
Daniel Molkentin
0582abe8dd Shib: Wizard: Return to IdP selection when returning to creds page 2014-05-26 15:57:01 +02:00
Eran
f9192e27fa added "/s" to the bandwidth 2014-05-26 16:25:33 +03: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
Eran
ba5e955ccb chaned the design a little 2014-05-25 22:43:41 +03: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
Klaas Freitag
1303379c9e Remove useless global varialbe for auth callback. 2014-05-22 12:54:14 +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
Eran
fae3e46a59 made the code a little cleaner 2014-05-20 16:56:39 +03: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
Eran
3777074e84 Remove extra space between the parenthesis when displaying estimation in the system tray 2014-05-15 17:46:25 +03:00
Daniel Molkentin
81c768099e Folder: Correctly reflect paused state after restart 2014-05-15 15:04:48 +02:00
Daniel Molkentin
4bcaebb322 Decrease debug noise 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
Daniel Molkentin
9f6e9f8e1b Fix crash: if the credentials cannot be cast, don't deref, assume change 2014-05-15 11:12:18 +02:00
Klaas Freitag
f89bfce068 Enable core dumping if the env variable OWNCLOUD_CORE_DUMP is defined
Set OWNCLOUD_CORE_DUMP to anything to get a core dump in case of
crashing.
2014-05-15 11:01:21 +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
Eran
5310a3cc1d better time prediction 2014-05-14 16:57:14 +03: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
Eran
1509c4ffba made the time description more malleable ,added support for none size update estimation (ie.. deletion), made the estimation more responsive at start and less jittery after some time 2014-05-14 10:55:04 +03:00
hefee
07f57b1982 make Debian GNU/kFreeBSD compile 2014-05-13 16:51:42 +02:00
Olivier Goffart
574e030caf Use a different key than "user" to store the shib user
There is a HACK from commit fa0a2764a4
Which save the http user as a user for all credidentials, but that
cannot work with shibboleth

Fixes https://github.com/owncloud/enterprise/issues/175
2014-05-13 11:54:36 +02:00
Eran
71ea2b582c changed the systray to display total size and estimated time when the syncronization actually has size changed the descriptive time logic to be more generic 2014-05-12 17:36:27 +03:00
Eran
219098c182 Changed the time estimate string to be more textual, also added lower limit to the estimate to prevents starting estimation jittering 2014-05-12 00:26:17 +03: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
a8c1ffc2f4 Add a header file for owncloudcmd.cpp to avoid (auto)moc problems. 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
Olivier Goffart
d62deabf9b Fix updating mtime
Fixup commit 9193286fc1
Use the right URL for the PROPPATCH and HEAD, do not let other
jobs start when we wait for the UpdateMTimeAndETagJob
Update the etag and the fileid of the real item.
2014-04-30 10:24:17 +02:00
Markus Goetz
876de8fd69 Networkjobs: Remove stray include 2014-04-29 17:55:26 +02:00
Olivier Goffart
983f9c5dde The job restore job need to be run with QMetaObject::invoke
Because the job might be in a different thread.
2014-04-29 16:58:24 +02:00
Olivier Goffart
9193286fc1 Support old server which do not have the x-oc-mtime support
Owncloud 4.5
Or owncloud 5 with chunking

Fixes https://github.com/owncloud/core/issues/8392
2014-04-29 16:58:24 +02:00
Olivier Goffart
1b8d11182b Add missing include
This was required so the compiler sees the declaration of
CredentialsFactory::create which should be exported
2014-04-29 16:04:24 +02:00
Olivier Goffart
dcc5c105eb fix forward declaration of CredentialsFactory::create 2014-04-29 15:50:19 +02:00
Klaas Freitag
64b42333b0 Fix typo. 2014-04-29 15:36:13 +02:00
Olivier Goffart
3ee729bc4a Add export macro to all classes that need to be exported 2014-04-29 15:31:14 +02:00
Daniel Molkentin
a268b03990 Try to not have windows stay-on-top 2014-04-29 15:31:03 +02:00
Olivier Goffart
9f0848ba15 Merge remote-tracking branch 'origin/libowncloudsync_noqtgui' 2014-04-29 12:23:15 +02:00
Olivier Goffart
f159b028b4 Add a compile option to not blacklist error code 5xx 2014-04-29 11:39:46 +02:00
Olivier Goffart
7e702778a1 Add missing line break 2014-04-29 11:27:31 +02:00
Eran
35b3ddd61f Made the estimated time only appear in the systray when the sync has actual size. 2014-04-29 02:43:35 +03:00
Eran
a892b79dba Seperated the systray estimation text to a seperate action, fixed an integer rounding bug 2014-04-29 02:31:27 +03:00
Eran
cd22a1846f Fixed Indentation and multiple concurrent files syncing case ...
..Also increased the height of folder progress bar alittle in order to accommodate the added estimation data
2014-04-28 18:49:27 +03:00
Markus Goetz
4489a56c65 Csync: Set error at correct place 2014-04-28 17:25:18 +02:00
Markus Goetz
7f752c7e93 Csync: Plug code for csync_file_locked_or_open 2014-04-28 16:57:56 +02:00
Daniel Molkentin
2d3ea59755 Limit the mac workaround to the Mac OS X platform 2014-04-28 10:13:53 +02:00
Eran
eadcdab8e7 Issue-#142 : Added support for current file completion estimation.
Changed the account settings estimation to display both current file and overwhole estimation.
Decresed the progress font size to fit the added information
2014-04-27 00:48:12 +03:00
Olivier Goffart
9da261acd8 Do not read from the database when upgrading from 1.5
We need to make sure that the file id are updated (if the user
had upgraded from owncloud 5 to owncloud 6 while using owncloud 1.5)
2014-04-25 13:31:44 +02:00
Eran
46ffd1c29a Issue-142 : added time estimation and bandwidth indicator to the systry and active download 2014-04-25 01:08:25 +03:00
Olivier Goffart
642c16b09b Missing EXPORT 2014-04-24 23:57:42 +02:00
Olivier Goffart
5c92c190f0 Add EXPORT macro to owncloudsync library
Not all the class are exported currently, only the one that seems to be used
by the command line tools
2014-04-24 23:45:20 +02:00
hefee
9b7a3d00ee Using QFile::decodeName instead of QLatin1String 2014-04-23 18:59:40 +02:00
Sandro Knauß
1d862b77af merged 1.5 into master 2014-04-23 18:54:49 +02:00
Olivier Goffart
f2519e9d87 Fix function signature: pass argument by const reference 2014-04-22 19:52:09 +02:00
Markus Goetz
197d180cb9 Propagator: Add support for CSYNC_CONFLICT_FILE_USERNAME 2014-04-22 16:17:49 +02:00
Markus Goetz
4be20db670 Propagator: Add makeConflictFileName function 2014-04-22 16:07:18 +02:00
Olivier Goffart
46d6191bc2 Also list folder for which the alias starts with '.'
Fixes #1695
2014-04-22 14:26:08 +02:00
Olivier Goffart
ee22f377af Start the folder watcher when new folder are added
Before, we would only set up a file system watcher when we read the
config at startup.  But we also need to do it in the other case when
the user configure new folder to watch
2014-04-22 14:15:43 +02:00
Olivier Goffart
44a04227f1 Update dynamically the error message in the account settings
This let the error be shown when the conneciton is missing at startup

And also remove the red background when there is no longer an error
2014-04-22 14:08:37 +02:00
Olivier Goffart
707c6fcc5d An abort on the reply is not usually a password error.
Copy the code from HTTPCredidentials
2014-04-22 12:52:13 +02:00
Olivier Goffart
edb1f61241 Fix compilation without the BUILD_ONLY_LIBRARIES mode 2014-04-22 12:44:01 +02:00
Olivier Goffart
3fac5f91c8 In case of error, report the right error instead of missing etag
also, missing etag is not a fatal error
2014-04-22 12:43:38 +02:00
Olivier Goffart
1338c08622 Fix compilation on linux with BUILD_LIBRARIES_ONLY 2014-04-22 11:33:38 +02:00
Olivier Goffart
0cf8091705 Merge pull request #1700 from wakeup/master
Fix non-closed p tag
2014-04-22 10:08:29 +02:00
Klaas Freitag
c24732f641 More debugable code. 2014-04-22 09:33:07 +02:00
Markus Goetz
77ac092975 WiP: Attempt to compile without UI 2014-04-21 19:57:15 +02:00
Volkan Gezer
78e5e4ab66 Fix non-closed p tag 2014-04-21 15:29:42 +02:00
Volkan Gezer
9b71643c1c Space fix 2014-04-20 14:54:40 +02:00
Olivier Goffart
b08284e4cc Fix the background check job for the connection
We can't use the quota job for that as it needs the credidentials and therefore
may re-enter the credidential code when we are currently trying to fetch the credentials.

The quotainfo.cpp part of this patch is basically a revert of d836b80153
2014-04-19 09:49:52 +02:00