Commit Graph
90 Commits
Author SHA1 Message Date
Kenneth Skovhede 40dd3c6816 Updated all license mentions to MIT 2024-02-28 15:45:30 +01:00
Dean Ferreyra c50223eafe Renames relating to the extended device path prefix, \\?\ 2021-11-12 07:29:43 -08:00
warwickmmandGitHub 83318877a1 Merge pull request #4285 from dferreyra/source_path_with_unc_prefix_3
Handle Windows source paths starting with "\\?\"
2020-08-21 07:38:12 -07:00
Dean Ferreyra b8eecba62c Handle Windows source paths starting with "\\?\"
Under Windows, strip paths of any `\\?\` prefix to prevent Duplicati
from storing paths prefixed with `\\?\`.

This fixes an inconsistency in the stored data where, if the user
provided a prefixed path to back up (e.g., `\\?\C:\Temp`), Duplicati
would store an entry with the prefixed path (e.g., `\\?\C:\Temp`)
along with entries with paths stripped of their prefix (e.g.,
`C:\Temp\file.txt`).  By only storing non-prefixed paths, this also
avoids an error reported by the GUI when it would encounter a prefixed
path:
```
Filter for list-folder-contents must be a path prefix with no wildcards Parameter name: filter
```
2020-08-15 20:09:54 -07:00
Dean Ferreyra ecd62e8cea Fix snapshots broken by #4256
Add comment in `WindowsSnapshot.ConvertToSnapshotPath()` warning how
replacing some manual path construction code with Path.Combine() alone
can lead to invalid snapshot paths.
2020-08-08 15:32:54 -07:00
Dean Ferreyra 1198c10d43 Fix snapshots broken by #4256
Revert the change made to `WindowsSnapshot.ConvertToSnapshotPath()`
by pull request #4256.

The change in #4256 replaced some existing manual path construction
code with a call to `SystemIO.IO_WIN.PathCombine()`, but calling
`SystemIO.IO_WIN.PathCombine()` this way did not always result in
valid VSS paths.  For example, trying to back up a root volume like
"C:\" would result in the following error:
```
The filename, directory name, or volume label syntax is incorrect.
```
2020-08-07 21:51:11 -07:00
Dean Ferreyra d154702020 Support problematic Windows paths
Fix pull request string comparisons in SystemIOWindows.cs to use
StringComparison.Ordinal.

Fix pull request to use SystemIO.IO_WIN.PathCombine() in
WindowsSnapshot.cs.
2020-07-19 16:24:51 -07:00
Dean Ferreyra 6acbbf2136 Support problematic Windows paths
Allow historically problematic Windows paths (i.e., files or
directories that end in a dot or a space) to be backed up with
Duplicati in Windows.

This fixes #3839.
2020-07-17 21:50:29 -07:00
Kenneth Hsu 83ac03843d Fix spelling errors in comments.
In doing so, we also normalized some line endings.
2019-12-14 09:52:55 -08:00
verhoek 2051e0b272 Added null check for writers to include in vss (issue 3494).
Improved exception logging.
2018-11-13 21:04:34 +01:00
verhoek b2cc18426c Renamed Library.IO to Library.Common.IO.
Moved basic Platform functions to Library.Common.Platform.
Turned IO_OS into property within Library.Common.
2018-11-02 21:34:07 +01:00
verhoek 9fb38ebe9a Continuation of Util.DirectorySeparatorString replacements. 2018-11-02 17:48:17 +01:00
verhoek 0aa62975b7 Simplified ListFolders similarly to ListFiles. 2018-10-31 13:07:04 +01:00
verhoek bd3bb04f86 Restructed ListFiles to be more understandable. 2018-10-31 12:32:35 +01:00
verhoek dd74245b75 Handled GetFiles calls at risky spots in combination with PathTooLongExceptions. 2018-10-30 17:16:13 +01:00
verhoek a90f577624 Redirected GetDirectories calls to Library.IO's version. 2018-10-30 13:38:25 +01:00
verhoek 52916b935b Replaced System.IO.Path with wrapper call to Alphaleonis. 2018-10-28 12:08:09 +01:00
verhoek 87c158f8cc Clean ups. 2018-10-27 21:40:58 +02:00
verhoek 1bf1daa189 Moved alphaleonis stuff to VSS wrapper objects in Libary.IO. 2018-10-27 12:29:39 +02:00
verhoek 40dc6da81d Created separate package for io wrapper. 2018-10-25 20:01:55 +02:00
verhoek a3cc49566d Added additional wrappers for alphaFS implementations. 2018-10-25 17:02:35 +02:00
verhoek 7872018bbd Moved vss to SystemIOWindows. Added GetDirectories to ISystemIO. 2018-10-25 16:42:53 +02:00
verhoek 2e0fb275ea Moved GetPathRoot to SystemIOWindows instead of using AlphaFS directly. 2018-10-25 10:23:50 +02:00
Kenneth Hsu d4d1945faf Use utility method to append trailing slash.
This removes some duplicated code.
2018-09-22 10:19:45 -07:00
Kenneth Skovhede a5cfeff912 Removed the one-element cache to avoid potential race conditions.
Rewrote the path mapping to use simpler operations.
This is a potential fix for #3307
2018-08-14 14:42:51 +02:00
Kenneth Skovhede becf9f7307 Merge branch 'feature/fix-vss-on-drive' 2018-06-30 19:14:36 +02:00
Kenneth Skovhede 39ddebcdf5 Added a default to exclude the System State VSS writer.
This fixes #3236
2018-06-30 19:11:42 +02:00
Kenneth Skovhede 06d6352aca Tested and fixed the VSS mapping problem caused by using Path.Combine with a \?\\GLOBALROOT\ prefixed path. 2018-06-30 18:50:06 +02:00
Kenneth Skovhede bf14017eec Rewrote the logic for returning a VSS path for a locally mapped path to fix issues with using VSS on a drive directly 2018-06-29 10:35:37 +02:00
verhoek 30cd41585b Corrected spelling function name. 2018-05-16 20:08:40 +02:00
Kenneth Skovhede 2b54bb9415 Removed the redundant byte-array-to-string method from the MD5 module, and added a using directive.
Added some additional logging to better diagnose issues with VSS/LVM snapshots.
2018-05-09 10:44:32 +02:00
Daniel Gehriger 0b43c467c7 Merge remote-tracking branch 'upstream/master' into feature/usn 2018-04-25 17:19:13 +02:00
Kenneth Skovhede e51e1b9e5a Implemented option to use exclude filenames to mark folders for exclusion by placing a specially named file inside 2018-04-24 11:25:37 +02:00
Daniel Gehriger 6ce298b4af Fixed USN in conjunction with snapshots on Windows 2018-04-22 23:37:45 +02:00
Daniel Gehriger 96d1390412 Disabling USN for now when snapshots are used - this will be enabled shortly 2018-04-20 09:44:48 +02:00
Daniel Gehriger 8af63b1d5d Fixed some of the issues reported by codacy. The others are incorrect warnings. 2018-04-20 09:17:06 +02:00
Daniel Gehriger 2c1a0ddb4e Implemented backup based on changes recorded in NTFS USN journal 2018-04-19 22:59:28 +02:00
Kenneth Skovhede 842fd96543 Implemented a new logging system that is more transparent and allows a more granular way of picking log messages.
Added ID's to each log message and each exception to allow later introduction of a Knowledgebase service that explains each error in more detail.
2018-03-15 09:12:34 +01:00
Tyler Gill 08e0708a95 Change Duplicati's handling of reparse points, so that not all reparse points are treated as symlinks.
This is inspired largely by the new (/ returning) feature of OneDrive in Windows 10 Fall Creator's Update, which downloads files on-demand.
A side effect of that change is that the OneDrive folder (and subfolders of it) are marked as reparse points, even though they are not technically standard symlinks.
With this change, a new extension method IsSymlink is added for ISnapshotService and ISystemIO, which checks both the file attributes (for reparse point) and the symlink target path (if null, the path is not treated as a symlink).
All places that previously checked only the file attributes have been updated to use either this method (or at least the same logic, in the case of the core BackupHandler file check).
One side effect of this change is that '--symlink-policy=store' no longer ignores empty symlinks - they are now treated as regular files.
If there are empty symlinks, they will now be backed up as if they were regular files, but I don't know what the conditions are that create symlinks like that, so this might not effect anything in practice.
2018-02-06 13:24:49 -07:00
Kenneth Hsu 8810e0130d Make string comparisons use ordinal (binary) sort rules.
These string comparisons should not be culture-aware.
2017-11-26 11:19:54 -08:00
Kenneth Hsu 65593ddd93 Remove unncessary sorting.
The original implementation only sorted the collection if there were
duplicates.  This indicates that the result does not really need to be
sorted.
2017-09-29 21:41:41 -07:00
Kenneth Hsu c8ac480c09 Use helper method to get unique items and duplicates. 2017-09-28 22:02:05 -07:00
Kenneth Skovhede cafb8e6ff1 Fixed issues with reporting the correct error message when enumerating files 2017-01-23 20:53:18 +01:00
Kenneth Skovhede 1f7110503a Updated unix symlinks handling to store correct metadata for symlinks 2016-11-03 13:11:53 +01:00
Max 5c7dfcada7 Refactor of hyper-v backup 2016-10-22 23:08:27 +02:00
Max e4a1ee9afa ability to see hyperv vms paths 2016-10-16 22:36:29 +02:00
Max f56d4f6ab9 changed structure of hyper-v source 2016-10-16 02:18:56 +02:00
Max c09e69765e Merge branch 'master' 2016-10-15 16:18:38 +02:00
Max f68695ca41 Added ability to backup hyperv using webgui 2016-10-15 16:18:26 +02:00
Max 8ede30b0a1 small adjust vss 2016-10-10 23:25:27 +02:00