diff options
author | verhoek <30193551+verhoek@users.noreply.github.com> | 2018-10-30 15:38:25 +0300 |
---|---|---|
committer | verhoek <30193551+verhoek@users.noreply.github.com> | 2018-10-30 15:38:25 +0300 |
commit | a90f577624e2d1729634cd8b84c09495ac031006 (patch) | |
tree | efe0a910567b91db400eef7adb8ac28f4ca800cf /Duplicati | |
parent | 215334376b25e1a3fb024df231af68ff05a8f92d (diff) |
Redirected GetDirectories calls to Library.IO's version.
Diffstat (limited to 'Duplicati')
-rw-r--r-- | Duplicati/Library/AutoUpdater/UpdaterManager.cs | 2 | ||||
-rw-r--r-- | Duplicati/Library/Snapshots/SnapshotBase.cs | 2 | ||||
-rw-r--r-- | Duplicati/Library/Snapshots/WindowsSnapshot.cs | 2 | ||||
-rw-r--r-- | Duplicati/Library/Utility/Utility.cs | 2 | ||||
-rw-r--r-- | Duplicati/License/Duplicati.License.csproj | 10 | ||||
-rw-r--r-- | Duplicati/License/LicenseReader.cs | 8 |
6 files changed, 19 insertions, 7 deletions
diff --git a/Duplicati/Library/AutoUpdater/UpdaterManager.cs b/Duplicati/Library/AutoUpdater/UpdaterManager.cs index be0b9d890..0d21499fb 100644 --- a/Duplicati/Library/AutoUpdater/UpdaterManager.cs +++ b/Duplicati/Library/AutoUpdater/UpdaterManager.cs @@ -406,7 +406,7 @@ namespace Duplicati.Library.AutoUpdater {
var res = new List<KeyValuePair<string, UpdateInfo>>();
if (INSTALLDIR != null)
- foreach (var folder in System.IO.Directory.GetDirectories(INSTALLDIR))
+ foreach (var folder in SystemIO.IO_OS(Utility.Utility.IsClientWindows).GetDirectories(INSTALLDIR))
{
var r = ReadInstalledManifest(folder);
if (r != null)
diff --git a/Duplicati/Library/Snapshots/SnapshotBase.cs b/Duplicati/Library/Snapshots/SnapshotBase.cs index ef831b433..2a7b5aaee 100644 --- a/Duplicati/Library/Snapshots/SnapshotBase.cs +++ b/Duplicati/Library/Snapshots/SnapshotBase.cs @@ -180,7 +180,7 @@ namespace Duplicati.Library.Snapshots /// <param name='localFolderPath'>The folder to examinate</param> protected virtual string[] ListFolders(string localFolderPath) { - return Directory.GetDirectories(localFolderPath); + return SystemIO.IO_OS(Utility.Utility.IsClientWindows).GetDirectories(localFolderPath); } /// <summary> diff --git a/Duplicati/Library/Snapshots/WindowsSnapshot.cs b/Duplicati/Library/Snapshots/WindowsSnapshot.cs index 96dcef73c..123e82965 100644 --- a/Duplicati/Library/Snapshots/WindowsSnapshot.cs +++ b/Duplicati/Library/Snapshots/WindowsSnapshot.cs @@ -119,7 +119,7 @@ namespace Duplicati.Library.Snapshots }
else
{
- try { tmp = Directory.GetDirectories(spath); }
+ try { tmp = SystemIO.IO_WIN.GetDirectories(spath); }
catch (PathTooLongException) { }
}
diff --git a/Duplicati/Library/Utility/Utility.cs b/Duplicati/Library/Utility/Utility.cs index 5f384bc86..ccb753c72 100644 --- a/Duplicati/Library/Utility/Utility.cs +++ b/Duplicati/Library/Utility/Utility.cs @@ -227,7 +227,7 @@ namespace Duplicati.Library.Utility /// <returns>A list of the full filenames</returns>
public static IEnumerable<string> EnumerateFileSystemEntries(string rootpath, EnumerationFilterDelegate callback)
{
- return EnumerateFileSystemEntries(rootpath, callback, Directory.GetDirectories, Directory.GetFiles);
+ return EnumerateFileSystemEntries(rootpath, callback, SystemIO.IO_OS(Utility.IsClientWindows).GetDirectories, Directory.GetFiles);
}
/// <summary>
diff --git a/Duplicati/License/Duplicati.License.csproj b/Duplicati/License/Duplicati.License.csproj index 3aff3525b..af6ac8d0c 100644 --- a/Duplicati/License/Duplicati.License.csproj +++ b/Duplicati/License/Duplicati.License.csproj @@ -426,4 +426,14 @@ <Folder Include="licenses\mozroots\" />
<Folder Include="licenses\TlsTest\" />
</ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\Library\IO\Duplicati.Library.IO.csproj">
+ <Project>{D63E53E4-A458-4C2F-914D-92F715F58ACF}</Project>
+ <Name>Duplicati.Library.IO</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\Library\Utility\Duplicati.Library.Utility.csproj">
+ <Project>{DE3E5D4C-51AB-4E5E-BEE8-E636CEBFBA65}</Project>
+ <Name>Duplicati.Library.Utility</Name>
+ </ProjectReference>
+ </ItemGroup>
</Project>
\ No newline at end of file diff --git a/Duplicati/License/LicenseReader.cs b/Duplicati/License/LicenseReader.cs index 01ad385bf..ebc48fe13 100644 --- a/Duplicati/License/LicenseReader.cs +++ b/Duplicati/License/LicenseReader.cs @@ -20,7 +20,9 @@ using System;
using System.Collections.Generic;
using System.Text;
-
+using Duplicati.Library.IO; +using Duplicati.Library.Utility; + namespace Duplicati.License
{
/// <summary>
@@ -49,8 +51,8 @@ namespace Duplicati.License public static List<LicenseEntry> ReadLicenses(string basefolder)
{
List<LicenseEntry> res = new List<LicenseEntry>();
-
- string[] folders = System.IO.Directory.GetDirectories(basefolder);
+
+ string[] folders = SystemIO.IO_OS(Utility.IsClientWindows).GetDirectories(basefolder);
Array.Sort(folders);
foreach (string folder in folders)
|