1
0
mirror of https://github.com/chylex/Nextcloud-Desktop.git synced 2024-09-29 00:42:45 +02:00
Commit Graph

56 Commits

Author SHA1 Message Date
Hannah von Reth
48f4c1e9e1 Log fallback result 2021-08-23 09:44:34 +02:00
Hannah von Reth
789e0e45d5 Fix Windows long path issue introduced in dd641fae997d71c8396b77def2fa25ad96fdf47f 2021-08-23 09:40:27 +02:00
Valdnet
7ebbb499e0 l10n: Replace apostrophe with double quotation
Signed-off-by: Valdnet <47037905+Valdnet@users.noreply.github.com>
2021-07-30 06:21:05 +00:00
Hannah von Reth
51d73e27ea
Clarify comment 2020-12-30 16:17:46 +01:00
Hannah von Reth
3f873ed2ee
Simplify file comparison 2020-12-30 16:17:46 +01:00
Hannah von Reth
4589772393
Remove more legacy C code 2020-12-15 10:59:15 +01:00
Hannah von Reth
47dc7e6c49
Remove custome string functions 2020-12-15 10:59:15 +01:00
Christian Kamm
2b20985875
winvfs: initial work
Done by ckamm and dschmidt
2020-12-15 10:58:21 +01:00
Christian Kamm
f62be57ef2
FileSystem: make removeRecursively() reusable
We want to use it for deleting directory conflicts.
2020-10-22 16:39:17 +02:00
Olivier Goffart
5d0aa5f039 Remove unused c_path 2018-01-13 13:58:17 +01:00
Jocelyn Turcotte
bd25225045 Move non-csync-dependent parts of FileSystem to src/common
This keep the csync-dependent parts in src/libsync, slitting the namespace
over two files.
This will allow moving SyncJournalDB to src/common as well.
2017-09-18 14:00:52 +02:00
Helmut K. C. Tessarek
709aa27031 remove qt4 code 2017-09-15 07:11:05 +02:00
Jocelyn Turcotte
e8f7adc7ca Replace csync_vio_file_stat_t with csync_file_stat_t
Also move csync_normalize_etag to common/utility since we
don't need the char* function anymore.

Remove the single space file_stat->remotePerm codepath since
this won't be used in csync anymore since
8de3bda0b1.

Issue #1817
2017-09-06 13:08:23 +02:00
Jocelyn Turcotte
cf15cbf0b3 Move Utility to a new common static library
Now that csync builds as C++, this will avoid having to implement
functionalities needed by csync mandatorily in csync itself.

This library is built as part of libocsync and symbols exported
through it.
This requires a relicense of Utility as LGPL. All classes moved into
this library from src/libsync will need to be relicensed as well.
2017-09-05 17:25:19 +02:00
Jocelyn Turcotte
4e5898efd7 Compile almost all of csync as C++
This will allow us to unify data structures between csync and libsync.

Utility functions like csync_time and c_std are still compiled as C
since we won't need to be coupled with Qt in the short term.
2017-08-22 15:22:56 +02:00
Jocelyn Turcotte
5a1bf7d8fe windows: Fix a memory leak in FileSystem::longWinPath
Also use c_path_to_UNC directly instead of doing an extra
UTF-8->wchar conversion.
2017-07-24 17:54:29 +02:00
Christian Kamm
c8d0f788e0 Apply clang-format 2017-05-17 12:26:27 +02:00
Jocelyn Turcotte
b7553d5bdf Upgrade some qCDebug to qCInfo or qCWarning
Use qCInfo for anything that has general value for support and
development. Use qCWarning for any recoverable error and qCCritical
for anything that could result in data loss or would identify a serious
issue with the code.

Issue #5647
2017-05-11 17:22:59 +02:00
Jocelyn Turcotte
4ad190a558 Use Qt logging categories for logging
This gives more insight about the logs and allow setting fine-tuned
logging rules. The categories are set to only output Info by default
so this allows us to provide more concise logging while keeping the
ability to extract more information for a specific category when
developping or debugging customer issues.

Issue #5647
2017-05-11 17:22:59 +02:00
Markus Goetz
2e3a3bcf84 Folder: Make folder only accessible by user #5282 (#5315)
Because on OS X the parent folder might not protect
against access.
2016-11-23 11:05:41 +01:00
Christian Kamm
db24f60ae3 License: Adjust license of GPLv2 source files to GPLv2+
See #5180
2016-10-25 11:06:54 +02:00
Jocelyn Turcotte
2b274e9460 Fix the MSVC build
- Replace functions that are provided by MinGW with a Win32-based
  implementation
- Explicitly export needed symbols from ocsync.dll
- Rename share.h to sharemanager.h since the name clashes with one
  of the Windows headers and get included from there
- Remove the timestamp from the fallback csync stderr logging, it's
  not used since we always provide a log callback
2016-09-16 17:43:39 +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
ckamm
e6b937f508 LockWatcher: Keep an eye on Windows file locks (#4758)
When a conflict-rename or a temporary-rename fails, notify the
LockWatcher. It'll regularly check whether the file has become
accesible again. When it has, another sync is triggered.

owncloud/enterprise#1288
2016-04-29 16:14:18 +02:00
Christian Kamm
17895f3a30 Win: Fix filesystem detection for exFAT workaround #2701 2016-01-19 10:00:12 +01:00
Christian Kamm
2662203fb7 Windows: Fix deleting and replacing of read-only files #4308 2016-01-05 13:15:59 +01:00
Christian Kamm
d4edab02b0 Propagator: Deal with directories becoming files #4302
Note, in particular the revised order of directory deletion jobs.
2016-01-05 10:26:41 +01:00
Olivier Goffart
cf5b1e401c csync_vio_local_stat: Win: fetch mtime and size if not previously fetched
Since owncloud 2.1, csync_vio_local_stat was optimized because readdir
would already fetch most of the info.  This works for the discovery,
but not later.  And we used this function later for symliks and co.

So this fixes the .lnk on windows

Issue #4300
2015-12-21 14:25:30 +01:00
Christian Kamm
6cf5fc7f7d Permissions: Keep more user permissions
t4.pl discovered that it'd needlessly override permissions sometimes
2015-11-23 13:24:05 +01:00
Daniel Molkentin
1d9c591c08 Fix OS X compilation: use mode_t instead of __mode_t 2015-11-11 09:36:17 +01:00
Christian Kamm
175ad6fb77 Reflect read-only permissions in filesystem #3244 2015-11-10 10:14:25 +01:00
Klaas Freitag
419d18c128 FileSystem: Reuse the FileInfo object that is created in the caller.
With that, a lot of stats can be avoided, ie. in SocketAPI
2015-10-09 13:02:02 +02:00
Phil Davis
f0e17fd9c0 libtypos comment and message typos for master 2015-10-05 09:05:09 +05:45
Klaas Freitag
b0aedef4b0 Sync: Store information about ignored files on the server in database.
That allows better handling of remove requests that should not be done
because the directory is not empty on the remote side (as it contains
ignored files).
2015-07-15 15:49:27 +02:00
Klaas Freitag
c7ba7c8e9f Fix comment for c_path_to_UNC, plus cleanup of superflous debug. 2015-07-08 18:13:41 +02:00
Klaas Freitag
b8077d2f5b FileSystem: Use long file name handling method from csync.
This helps to only maintain one version of the function.
2015-07-08 18:13:40 +02:00
Klaas Freitag
e74801fd3d Win32 long filename format for Qt functions. 2015-07-08 18:13:39 +02:00
Klaas Freitag
64ce0cd7a2 Improved implementation efficiency of checksum calculation.
Based on Oliviers suggestions the file read routine now reuses
one buffer to read the entire file.

Other cleanups.
2015-05-20 21:42:08 +02:00
Klaas Freitag
ddfe3fa7ab TransmissionChecksum: Fix identation. 2015-05-20 10:49:18 +02:00
Klaas Freitag
1f7274c2f2 TransmissionChecksum: Removed "pseudo" thread worker functions
Removed the Worker postfix from the method names to reflect their non
threaded character, they moved into a thread in the Validator class.

Thanks ckamm for review.
2015-05-20 10:45:20 +02:00
Klaas Freitag
67d38bc87b Filesystem Utilities: Add Checksum calculation methods. 2015-05-19 17:09:39 +02:00
Christian Kamm
79ac61684c Propagator: Overwrite local data only if unchanged. #3156 2015-05-07 14:43:33 +02:00
Christian Kamm
1dd3488973 Uploads: Fix big seeks on Windows. #2954 2015-03-12 13:18:08 +01:00
Christian Kamm
efe9f1b442 Lnk: Work around QFile::rename() #2792
QFile::rename() fails if the source file is a shortcut to a file
or directory that does not exist.
2015-03-11 12:29:33 +01:00
Klaas Freitag
05624e3fc8 FileSystem: Remove QFileInfo based implementations.
QFileInfo has to be refreshed if the underlying file has been
modified in between. That is dangerous so ckamm and me decided
to eliminate the QFileInfo based implementations.

This was triggered by a bug that the client uploaded files that
it should not have.
2015-02-27 15:27:49 +01:00
Roeland Jago Douma
51c617801d static member QFileInfo::exists is not available on 4.8 2015-02-27 08:43:33 +01:00
Christian Kamm
f88398e776 lnk files: Fix exists() calls. #2792 2015-02-25 11:50:32 +01:00
Christian Kamm
9ba88f6baf Windows: Sync .lnk files correctly. #2792 2015-02-12 11:27:58 +01:00
Christian Kamm
5cdf448693 SyncJournal: Use DELETE journal mode on FAT filesystems. #2693 2015-02-11 14:03:55 +01:00
Markus Goetz
906779c4b1 SyncEngine: Use QNAM for csync_update
This is for #2507
2015-01-20 18:27:25 +01:00