Skip to content

Commit 39675e1

Browse files
committed
v5.6.16262.0-Beta2
1 parent 73bcf46 commit 39675e1

29 files changed

+525
-429
lines changed

Common/Common.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@
1010
<Platforms>AnyCPU;x64</Platforms>
1111
</PropertyGroup>
1212
<ItemGroup>
13-
<PackageReference Include="ITHit.FileSystem" Version="5.6.15918.0-Beta2" />
13+
<PackageReference Include="ITHit.FileSystem" Version="5.6.16262.0-Beta2" />
1414
</ItemGroup>
1515
</Project>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
<PackageReference Include="Microsoft.Windows.SDK.Contracts" Version="10.0.19041.1" />
2121
</ItemGroup>
2222
<ItemGroup>
23-
<PackageReference Include="ITHit.FileSystem.Windows.Package" Version="5.6.15918.0-Beta2" />
24-
<PackageReference Include="ITHit.FileSystem.Windows" Version="5.6.15918.0-Beta2" />
23+
<PackageReference Include="ITHit.FileSystem.Windows.Package" Version="5.6.16262.0-Beta2" />
24+
<PackageReference Include="ITHit.FileSystem.Windows" Version="5.6.16262.0-Beta2" />
2525
<ProjectReference Include="..\..\..\Common\Common.csproj" />
2626
</ItemGroup>
2727
</Project>

Windows/Common/Core/LogFormatter.cs

Lines changed: 40 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ private string ConfigureLogger()
8383
}
8484

8585
/// <summary>
86-
/// Prints environment description.
86+
/// Prints environment description and console commands.
8787
/// </summary>
8888
public void PrintEnvironmentDescription()
8989
{
@@ -94,30 +94,46 @@ public void PrintEnvironmentDescription()
9494
log.Info($"\n{".NET version:",-25} {RuntimeInformation.FrameworkDescription} {IntPtr.Size * 8}bit.");
9595
log.Info($"\n{"Package or app identity:",-25} {PackageRegistrar.IsRunningWithIdentity()}");
9696
log.Info($"\n{"Sparse package identity:",-25} {PackageRegistrar.IsRunningWithSparsePackageIdentity()}");
97-
log.Info($"\n{"Elevated mode:",-25} {new System.Security.Principal.WindowsPrincipal(System.Security.Principal.WindowsIdentity.GetCurrent()).IsInRole(System.Security.Principal.WindowsBuiltInRole.Administrator)}");
97+
log.Info($"\n{"Elevated mode:",-25} {new System.Security.Principal.WindowsPrincipal(System.Security.Principal.WindowsIdentity.GetCurrent()).IsInRole(System.Security.Principal.WindowsBuiltInRole.Administrator)}");
98+
99+
string sparsePackagePath = PackageRegistrar.GetSparsePackagePath();
100+
if (File.Exists(sparsePackagePath))
101+
{
102+
log.Info($"\n{"Sparse package location:",-25} {sparsePackagePath}");
103+
var cert = System.Security.Cryptography.X509Certificates.X509Certificate.CreateFromSignedFile(sparsePackagePath);
104+
log.Info($"\n{"Sparse package cert:",-25} Subject: {cert.Subject}, Issued by: {cert.Issuer}");
105+
}
106+
else
107+
{
108+
log.Info($"\n{"Sparse package:",-25} Not found");
109+
}
110+
111+
// Log console commands.
112+
PrintHelp();
98113
}
99114

100115
/// <summary>
101-
/// Print Engine config, settings, console commands, logging headers.
116+
/// Print Engine config, settings, logging headers.
102117
/// </summary>
103118
/// <param name="engine">Engine instance.</param>
104119
/// <param name="remoteStorageRootPath">Remote storage root path.</param>
105120
public async Task PrintEngineStartInfoAsync(EngineWindows engine)
106121
{
107122
await PrintEngineEnvironmentDescriptionAsync(engine);
108-
109-
// Log console commands.
110-
PrintHelp();
123+
log.Info("\n");
111124

112125
// Log logging columns headers.
113126
PrintHeader();
114127
}
115128

116129
public async Task PrintEngineEnvironmentDescriptionAsync(EngineWindows engine)
117130
{
131+
log.Info($"\n");
118132
log.Info($"\n{"File system root:",-25} {engine.Path}");
119133
log.Info($"\n{"Remote storage root:",-25} {remoteStorageRootPath}");
120134
log.Info($"\n{"AutoLock:",-25} {engine.AutoLock}");
135+
log.Info($"\n{"Outgoing sync, ms:",-25} {engine.SyncService.SyncIntervalMs}");
136+
121137

122138
// Log indexing state. Sync root must be indexed.
123139
await PrintIndexingStateAsync(engine.Path);
@@ -138,16 +154,23 @@ private async Task PrintIndexingStateAsync(string path)
138154
/// </summary>
139155
public void PrintHelp()
140156
{
141-
log.Info("\n\nPress Esc to unregister file system, delete all files/folders, unregister sparse package, unregister handlers and exit (simulate uninstall).");
142-
log.Info("\nPress Spacebar to exit without unregistering (simulate reboot).");
143-
log.Info("\nPress 'p' to unregister file system, delete all files/folders, developer certificate, unregister sparse package, unregister handlers and exit (simulate full uninstall).");
144-
log.Info("\nPress 'e' to start/stop the Engine and all sync services.");
145-
log.Info("\nPress 's' to start/stop synchronization service.");
146-
log.Info("\nPress 'm' to start/stop remote storage monitor.");
147-
log.Info("\nPress 'd' to enable/disable debug and performance logging.");
148-
log.Info($"\nPress 'l' to open log file. ({LogFilePath})");
149-
log.Info($"\nPress 'b' to submit support tickets, report bugs, suggest features. (https://userfilesystem.com/support/)");
150-
log.Info("\n----------------------\n");
157+
log.Info("\n\n ----------------------------------------------------------------------------------------");
158+
log.Info("\n Commands:");
159+
PrintCommandDescription("Spacebar", "Exit without unregistering (simulate reboot)");
160+
PrintCommandDescription("Esc", "Unregister file system, delete all files/folders, unregister handlers and exit.");
161+
PrintCommandDescription("Shift-Esc", "Unregister file system, delete all files/folders, unregister handlers, uninstall developer certificate, unregister sparse package and exit (simulate full uninstall).");
162+
PrintCommandDescription("e", "Start/stop the Engine and all sync services.");
163+
PrintCommandDescription("s", "Start/stop synchronization service.");
164+
PrintCommandDescription("m", "Start/stop remote storage monitor.");
165+
PrintCommandDescription("d", "Enable/disable debug and performance logging.");
166+
PrintCommandDescription("l", $"Open log file. ({LogFilePath})");
167+
PrintCommandDescription("b", "Submit support tickets, report bugs, suggest features. (https://userfilesystem.com/support/)");
168+
log.Info("\n ----------------------------------------------------------------------------------------");
169+
}
170+
171+
private void PrintCommandDescription(string key, string description)
172+
{
173+
log.Info($"{Environment.NewLine} {key, 12} - {description,-25}");
151174
}
152175

153176
public void LogError(IEngine sender, EngineErrorEventArgs e)
@@ -190,16 +213,6 @@ private void WriteLog(IEngine sender, EngineMessageEventArgs e, log4net.Core.Lev
190213
string sourcePath = e.SourcePath?.FitString(sourcePathWidth, 6);
191214
string targetPath = e.TargetPath?.FitString(sourcePathWidth, 6);
192215

193-
// Trim sync root and remote storage root to reduce ammount of logging and improve logs readability
194-
//if (sender != null)
195-
//{
196-
//sourcePath = sourcePath?.Replace((sender as EngineWindows).Path, "<FS root>");
197-
//sourcePath = sourcePath?.Replace(remoteStorageRootPath, "<RS root>");
198-
199-
//targetPath = targetPath?.Replace((sender as EngineWindows).Path, "<FS root>");
200-
//targetPath = targetPath?.Replace(remoteStorageRootPath, "<RS root>");
201-
//}
202-
203216
string message = Format(DateTimeOffset.Now.ToString("hh:mm:ss.fff"), process, priorityHint?.ToString(), fileId, "", e.ComponentName, e.CallerLineNumber.ToString(), e.CallerMemberName, e.CallerFilePath, e.Message, sourcePath, att, targetPath);
204217

205218
if (level == log4net.Core.Level.Error)
@@ -233,6 +246,7 @@ private static string Format(string date, string process, string priorityHint, s
233246
/// </summary>
234247
private void PrintHeader()
235248
{
249+
log.Info("\n");
236250
log.Info(Format("Time", "Process Name", "Prty", "FS ID", "RS ID", "Component", "Line", "Caller Member Name", "Caller File Path", "Message", "Source Path", "Attributes", "Target Path"));
237251
log.Info(Format("----", "------------", "----", "_____", "_____", "---------", "____", "------------------", "----------------", "-------", "-----------", "----------", "-----------"));
238252
}

Windows/Common/Core/Registrar.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ private static void ValidateStorageProviderSyncRootInfo(StorageProviderSyncRootI
125125
}
126126

127127
/// <summary>
128-
/// Determins if the syn root is registered for specified folder.
128+
/// Determines if the syn root is registered for specified folder.
129129
/// </summary>
130130
/// <param name="path">Sync root path.</param>
131131
/// <returns>True if the sync root is registered, false otherwise.</returns>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<Platforms>AnyCPU;x64</Platforms>
1010
</PropertyGroup>
1111
<ItemGroup>
12-
<PackageReference Include="ITHit.FileSystem.Windows" Version="5.6.15918.0-Beta2" />
12+
<PackageReference Include="ITHit.FileSystem.Windows" Version="5.6.16262.0-Beta2" />
1313
<ProjectReference Include="..\..\..\Common\Common.csproj" />
1414
<ProjectReference Include="..\Core\Common.Windows.Core.csproj" />
1515
</ItemGroup>

Windows/Common/VirtualDrive/Interop/SHCNE.cs

Lines changed: 0 additions & 34 deletions
This file was deleted.

Windows/Common/VirtualDrive/Interop/SHCNF.cs

Lines changed: 0 additions & 16 deletions
This file was deleted.

Windows/Common/VirtualDrive/Interop/Shell32.cs

Lines changed: 0 additions & 22 deletions
This file was deleted.

Windows/Common/VirtualDrive/MenuCommandLock.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@
33
using System.IO;
44
using System.Threading;
55
using System.Threading.Tasks;
6-
using ITHit.FileSystem.Samples.Common.Windows.VirtualDrive.Interop;
76
using ITHit.FileSystem.Windows;
87

9-
108
namespace ITHit.FileSystem.Samples.Common.Windows
119
{
1210

@@ -78,8 +76,6 @@ public async Task InvokeAsync(IEnumerable<string> filesPath)
7876
await clientNotifications.UnlockAsync();
7977
else
8078
await clientNotifications.LockAsync();
81-
82-
Shell32.SHChangeNotify(SHCNE.SHCNE_UPDATEITEM, SHCNF.SHCNF_PATHW, userFileSystemPath, null);
8379
}
8480
catch (Exception ex)
8581
{

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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="5.6.15918.0-Beta2" />
22+
<PackageReference Include="ITHit.FileSystem.Windows.ShellExtension" Version="5.6.16262.0-Beta2" />
2323
</ItemGroup>
2424
<ItemGroup>
2525
<None Update="log4net.config">

0 commit comments

Comments
 (0)