Skip to content

Commit 4cbd863

Browse files
committed
v8.1.26727.0-Beta2
1 parent f5b8996 commit 4cbd863

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+679
-805
lines changed

Common/Common.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<Platforms>AnyCPU;x64</Platforms>
1111
</PropertyGroup>
1212
<ItemGroup>
13-
<PackageReference Include="ITHit.FileSystem.Windows" Version="8.1.26224.0-Beta2" />
14-
<PackageReference Include="ITHit.FileSystem" Version="8.1.26224.0-Beta2" />
13+
<PackageReference Include="ITHit.FileSystem.Windows" Version="8.1.26727.0-Beta2" />
14+
<PackageReference Include="ITHit.FileSystem" Version="8.1.26727.0-Beta2" />
1515
</ItemGroup>
1616
</Project>

Windows/Common/Core/Commands.cs

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -174,22 +174,28 @@ public async Task StopEngineAsync()
174174
/// Opens Windows File Manager with both remote storage and user file system for testing.
175175
/// </summary>
176176
/// <param name="openRemoteStorage">True if the Remote Storage must be opened. False - otherwise.</param>
177+
/// <param name="engineIndex">Index used to position Windows Explorer window to show this user file system.</param>
178+
/// <param name="totalEngines">Total number of Engined that will be mounted by this app.</param>
177179
/// <remarks>This method is provided solely for the development and testing convenience.</remarks>
178-
public void ShowTestEnvironment(string userFileSystemWindowName, bool openRemoteStorage = true, CancellationToken cancellationToken = default)
180+
public void ShowTestEnvironment(string userFileSystemWindowName, bool openRemoteStorage = true, CancellationToken cancellationToken = default, int engineIndex = 0, int totalEngines = 1)
179181
{
180-
// Open Windows File Manager with user file system.
181-
Commands.Open(Engine.Path);
182-
IntPtr hWndUserFileSystem = WindowManager.FindWindow(userFileSystemWindowName, cancellationToken);
183-
WindowManager.PositionFileSystemWindow(hWndUserFileSystem, 1, 2);
182+
int numWindowsPerEngine = 2; //openRemoteStorage ? 2 : 1; // Each engine shows 2 windows - remote storage and UFS.
183+
int horizintalIndex = engineIndex * numWindowsPerEngine;
184+
int totalWindows = totalEngines * numWindowsPerEngine;
184185

186+
// Open remote storage.
185187
if (openRemoteStorage)
186188
{
187-
// Open remote storage.
188189
Commands.Open(RemoteStorageRootPath);
189190
string rsWindowName = Path.GetFileName(RemoteStorageRootPath.TrimEnd('\\'));
190191
IntPtr hWndRemoteStorage = WindowManager.FindWindow(rsWindowName, cancellationToken);
191-
WindowManager.PositionFileSystemWindow(hWndRemoteStorage, 0, 2);
192+
WindowManager.PositionFileSystemWindow(hWndRemoteStorage, horizintalIndex, totalWindows);
192193
}
194+
195+
// Open Windows File Manager with user file system.
196+
Commands.Open(Engine.Path);
197+
IntPtr hWndUserFileSystem = WindowManager.FindWindow(userFileSystemWindowName, cancellationToken);
198+
WindowManager.PositionFileSystemWindow(hWndUserFileSystem, horizintalIndex + 1, totalWindows);
193199
}
194200

195201
#endif

Windows/Common/Core/Common.Windows.Core.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>net7.0-windows10.0.19041.0;net48</TargetFrameworks>
3+
<TargetFrameworks>net8.0-windows10.0.19041.0;net48</TargetFrameworks>
44
<UseWindowsForms>True</UseWindowsForms>
55
<Description>Contains functionality common for all Windows Virtual Drive samples.</Description>
66
<Authors>IT Hit LTD.</Authors>
@@ -21,8 +21,8 @@
2121
<PackageReference Include="Microsoft.Windows.SDK.Contracts" Version="10.0.19041.1" />
2222
</ItemGroup>
2323
<ItemGroup>
24-
<PackageReference Include="ITHit.FileSystem.Windows.Package" Version="8.1.26224.0-Beta2" />
25-
<PackageReference Include="ITHit.FileSystem.Windows" Version="8.1.26224.0-Beta2" />
24+
<PackageReference Include="ITHit.FileSystem.Windows.Package" Version="8.1.26727.0-Beta2" />
25+
<PackageReference Include="ITHit.FileSystem.Windows" Version="8.1.26727.0-Beta2" />
2626
<ProjectReference Include="..\..\..\Common\Common.csproj" />
2727
</ItemGroup>
2828
</Project>

Windows/Common/Core/Registrar.cs

Lines changed: 15 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public static async Task<bool> UnregisterSyncRootAsync(string syncRootPath, stri
119119

120120
if (res && !string.IsNullOrWhiteSpace(dataPath))
121121
{
122-
log.Debug($"Deleteing data folder {syncRootPath} {dataPath}");
122+
log.Debug($"Deleteing data folder for {syncRootPath}");
123123
try
124124
{
125125
Directory.Delete(dataPath, true);
@@ -172,6 +172,20 @@ private static async Task<bool> UnregisterSyncRootAsync(string syncRootPath, ILo
172172
}
173173
}
174174

175+
// Remore the read-only arrtibute. Otherwise delete fails.
176+
var allItems = Directory.EnumerateFileSystemEntries(syncRootPath, "*", SearchOption.AllDirectories);
177+
foreach(var path in allItems)
178+
{
179+
try
180+
{
181+
new FileInfo(path).IsReadOnly = false;
182+
}
183+
catch (Exception ex)
184+
{
185+
logger.Error($"Failed to remove read-only attribute for {path}", ex);
186+
}
187+
}
188+
175189
// Delete sync root folder.
176190
try
177191
{
@@ -186,36 +200,6 @@ private static async Task<bool> UnregisterSyncRootAsync(string syncRootPath, ILo
186200
return res;
187201
}
188202

189-
/*
190-
public async Task CleanupAppFoldersAsync(EngineWindows engine)
191-
{
192-
Log.Info("\n\nDeleting all file and folder placeholders.");
193-
try
194-
{
195-
if (Directory.Exists(UserFileSystemRootPath))
196-
{
197-
Directory.Delete(UserFileSystemRootPath, true);
198-
}
199-
}
200-
catch (Exception ex)
201-
{
202-
Log.Error("Failed to delete placeholders.", ex);
203-
}
204-
205-
try
206-
{
207-
if (engine != null && !string.IsNullOrWhiteSpace(engine.DataPath))
208-
{
209-
Directory.Delete(engine.DataPath, true);
210-
}
211-
}
212-
catch (Exception ex)
213-
{
214-
Log.Error($"\n{ex}");
215-
}
216-
}
217-
*/
218-
219203
/// <summary>
220204
/// Unregisters all sync roots that has a provider ID and removes all components.
221205
/// </summary>

Windows/Common/VirtualDrive/Common.Windows.VirtualDrive.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>net7.0-windows10.0.19041.0</TargetFrameworks>
3+
<TargetFrameworks>net8.0-windows10.0.19041.0</TargetFrameworks>
44
<Description>Contains functionality common for all Windows Virtual Drive samples.</Description>
55
<Authors>IT Hit LTD.</Authors>
66
<Product>IT Hit User File System</Product>
@@ -13,8 +13,8 @@
1313
<Compile Remove="IVirtualFolder.cs" />
1414
</ItemGroup>
1515
<ItemGroup>
16-
<PackageReference Include="ITHit.FileSystem.Windows.AppHelper" Version="8.1.26224.0-Beta2" />
17-
<PackageReference Include="ITHit.FileSystem.Windows" Version="8.1.26224.0-Beta2" />
16+
<PackageReference Include="ITHit.FileSystem.Windows.AppHelper" Version="8.1.26727.0-Beta2" />
17+
<PackageReference Include="ITHit.FileSystem.Windows" Version="8.1.26727.0-Beta2" />
1818
<ProjectReference Include="..\..\..\Common\Common.csproj" />
1919
<ProjectReference Include="..\Core\Common.Windows.Core.csproj" />
2020
</ItemGroup>

Windows/Common/VirtualDrive/CustomDataExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace ITHit.FileSystem.Samples.Common.Windows
1414
public static class CustomDataExtensions
1515
{
1616
/// <summary>
17-
/// Saves all custom metadata properties (eTag, locks, etc) to storage associated with an item.
17+
/// Saves all custom metadata properties, such as locks, to storage associated with an item.
1818
/// This data that is displayed in custom columns in file manager.
1919
/// </summary>
2020
/// <param name="properties">Custom data attached to the item.</param>

Windows/Common/VirtualDrive/VirtualEngineBase.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ public VirtualEngineBase(
8484
Debug += logFormatter.LogDebug;
8585
}
8686

87+
8788
/// <summary>
8889
/// Fired for each file or folder change.
8990
/// </summary>
@@ -160,6 +161,7 @@ private void LogItemChange(ItemsChangeEventArgs e, ChangeEventItem item)
160161
break;
161162
}
162163
}
164+
163165

164166
/// <inheritdoc/>
165167
public override async Task<bool> FilterAsync(SyncDirection direction, OperationType operationType, string path, FileSystemItemType itemType, string newPath, IOperationContext operationContext)

Windows/VirtualDrive/VirtualDrive.ShellExtension/VirtualDrive.ShellExtension.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>net7.0-windows10.0.19041.0</TargetFramework>
3+
<TargetFramework>net8.0-windows10.0.19041.0</TargetFramework>
44
<EnableComHosting>True</EnableComHosting>
55
<Platforms>x64</Platforms>
66
<ApplicationIcon />
@@ -19,7 +19,7 @@
1919
<PackageReference Include="System.Drawing.Common" Version="6.0.0" />
2020
</ItemGroup>
2121
<ItemGroup>
22-
<PackageReference Include="ITHit.FileSystem.Windows.ShellExtension" Version="8.1.26224.0-Beta2" />
22+
<PackageReference Include="ITHit.FileSystem.Windows.ShellExtension" Version="8.1.26727.0-Beta2" />
2323
</ItemGroup>
2424
<ItemGroup>
2525
<None Update="log4net.config">

Windows/VirtualDrive/VirtualDrive/VirtualDrive.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<OutputType>Exe</OutputType>
4-
<TargetFramework>net7.0-windows10.0.19041.0</TargetFramework>
4+
<TargetFramework>net8.0-windows10.0.19041.0</TargetFramework>
55
<Authors>IT Hit LTD.</Authors>
66
<Company>IT Hit LTD.</Company>
77
<Product>Virtual Drive</Product>
@@ -40,7 +40,7 @@ This is an advanced project with ETags support, Microsoft Office documents editi
4040
<PackageReference Include="System.Drawing.Common" Version="6.0.0" />
4141
</ItemGroup>
4242
<ItemGroup>
43-
<PackageReference Include="ITHit.FileSystem.Windows.Package" Version="8.1.26224.0-Beta2" />
43+
<PackageReference Include="ITHit.FileSystem.Windows.Package" Version="8.1.26727.0-Beta2" />
4444
<ProjectReference Include="..\..\..\Common\Common.csproj" />
4545
<ProjectReference Include="..\..\Common\VirtualDrive\Common.Windows.VirtualDrive.csproj" />
4646
</ItemGroup>

Windows/VirtualFileSystem/VirtualFileSystem.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<OutputType>Exe</OutputType>
4-
<TargetFrameworks>net7.0-windows10.0.19041.0</TargetFrameworks>
4+
<TargetFrameworks>net8.0-windows10.0.19041.0</TargetFrameworks>
55
<Authors>IT Hit LTD.</Authors>
66
<Company>IT Hit LTD.</Company>
77
<Product>Virtual File System</Product>
@@ -35,7 +35,7 @@ This project does not support ETags, locking, Microsoft Office documents editing
3535
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="3.1.7" />
3636
</ItemGroup>
3737
<ItemGroup>
38-
<PackageReference Include="ITHit.FileSystem.Windows.AppHelper" Version="8.1.26224.0-Beta2" />
38+
<PackageReference Include="ITHit.FileSystem.Windows.AppHelper" Version="8.1.26727.0-Beta2" />
3939
<ProjectReference Include="..\Common\Core\Common.Windows.Core.csproj" />
4040
</ItemGroup>
4141
<ItemGroup>

0 commit comments

Comments
 (0)