Skip to content

Commit e9de969

Browse files
committed
v4.0.11399.0-Beta
1 parent 0e50655 commit e9de969

20 files changed

+382
-161
lines changed

Common/Common.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
<RootNamespace>ITHit.FileSystem.Samples.Common</RootNamespace>
1010
</PropertyGroup>
1111
<ItemGroup>
12-
<PackageReference Include="ITHit.FileSystem" Version="4.0.11250.0-Beta" />
12+
<PackageReference Include="ITHit.FileSystem" Version="4.0.11399.0-Beta" />
1313
</ItemGroup>
1414
</Project>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="5.0.0" />
1414
</ItemGroup>
1515
<ItemGroup>
16-
<PackageReference Include="ITHit.FileSystem.Windows" Version="4.0.11250.0-Beta" />
16+
<PackageReference Include="ITHit.FileSystem.Windows" Version="4.0.11399.0-Beta" />
1717
<ProjectReference Include="..\..\..\Common\Common.csproj" />
1818
</ItemGroup>
1919
</Project>

Windows/Common/Core/Registrar.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ public static async Task RegisterAsync(string syncRootId, string path, string di
3737
storageInfo.RecycleBinUri = new Uri("https://userfilesystem.com/recyclebin");
3838
storageInfo.Context = CryptographicBuffer.ConvertStringToBinary(path, BinaryStringEncoding.Utf8);
3939

40-
storageInfo.HydrationPolicy = StorageProviderHydrationPolicy.Progressive;
40+
// To open mp4 files using Windows Movies & TV application the Hydration Policy must be set to Full.
41+
storageInfo.HydrationPolicy = StorageProviderHydrationPolicy.Full;
4142
storageInfo.HydrationPolicyModifier = StorageProviderHydrationPolicyModifier.AutoDehydrationAllowed; //| StorageProviderHydrationPolicyModifier.ValidationRequired;
4243

4344
// To implement folders on-demand placeholders population set the

Windows/Common/ShellExtension/Common.Windows.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="5.0.2" />
2020
</ItemGroup>
2121
<ItemGroup>
22-
<PackageReference Include="ITHit.FileSystem.Windows" Version="4.0.11250.0-Beta" />
22+
<PackageReference Include="ITHit.FileSystem.Windows" Version="4.0.11399.0-Beta" />
2323
<ProjectReference Include="..\..\..\Common\Common.csproj" />
2424
<ProjectReference Include="..\Rpc.Proto\Common.Windows.Rpc.Proto.csproj" />
2525
<ProjectReference Include="..\Rpc\Common.Windows.Rpc.csproj" />

Windows/Common/ShellExtension/ContextMenusProviderCommon.cs

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

Windows/Common/ShellExtension/ShellExtensionConfiguration.cs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
using log4net.Repository.Hierarchy;
88
using Microsoft.Extensions.Configuration;
99

10-
using ITHit.FileSystem.Samples.Common;
1110

1211
namespace ITHit.FileSystem.Samples.Common.Windows.ShellExtension
1312
{
@@ -21,10 +20,12 @@ public static class ShellExtensionConfiguration
2120
/// </summary>
2221
public static Settings AppSettings { get; private set; }
2322

23+
private static ILog Log { get; set; }
24+
2425
/// <summary>
2526
/// Initialize or load settings.
2627
/// </summary>
27-
public static void Initialize(Settings settings = null)
28+
public static void Initialize(Settings settings = null, ILog log = null)
2829
{
2930
if (settings != null)
3031
{
@@ -34,6 +35,7 @@ public static void Initialize(Settings settings = null)
3435
{
3536
AppSettings = Load();
3637
}
38+
Log = log;
3739
}
3840

3941
/// <summary>
@@ -53,6 +55,9 @@ public static bool IsVirtualDriveFolder(string path)
5355
/// </summary>
5456
public static ILog GetLogger(string logName)
5557
{
58+
if (Log != null)
59+
return Log;
60+
5661
string assemblyPath = Path.GetDirectoryName(typeof(ShellExtensionConfiguration).Assembly.Location);
5762
Hierarchy hierarchy = (Hierarchy)LogManager.GetRepository(typeof(ShellExtensionConfiguration).Assembly);
5863

@@ -71,11 +76,11 @@ public static ILog GetLogger(string logName)
7176
Path.Combine(
7277
Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData),
7378
AppSettings.AppID),
74-
"ShelIExtension.log");
79+
logName);
7580
}
7681
else
7782
{
78-
roller.File = Path.Combine(assemblyPath, "ShelIExtension.log");
83+
roller.File = Path.Combine(assemblyPath, logName);
7984
}
8085
roller.Layout = patternLayout;
8186
roller.MaxSizeRollBackups = 5;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="5.0.0" />
1414
</ItemGroup>
1515
<ItemGroup>
16-
<PackageReference Include="ITHit.FileSystem.Windows" Version="4.0.11250.0-Beta" />
16+
<PackageReference Include="ITHit.FileSystem.Windows" Version="4.0.11399.0-Beta" />
1717
<ProjectReference Include="..\..\..\Common\Common.csproj" />
1818
<ProjectReference Include="..\Core\Common.Windows.Core.csproj" />
1919
<ProjectReference Include="..\Rpc.Proto\Common.Windows.Rpc.Proto.csproj" />

Windows/Common/VirtualDrive/Rpc/GrpcServer.cs

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
using ITHit.FileSystem.Samples.Common.Windows.Rpc.Generated;
44
using GrpcDotNetNamedPipes;
55
using log4net;
6+
using System.IO.Pipes;
7+
using System.Security.Principal;
8+
using System.Security.AccessControl;
69

710
namespace ITHit.FileSystem.Samples.Common.Windows.Rpc
811
{
@@ -37,7 +40,9 @@ public void Start()
3740
Stop();
3841
}
3942

40-
NamedPipeServer server = new NamedPipeServer(rpcCommunicationChannelName);
43+
NamedPipeServer server = new NamedPipeServer(rpcCommunicationChannelName, new NamedPipeServerOptions() {
44+
CurrentUserOnly = true
45+
});
4146
ShellExtensionRpc.BindService(server.ServiceBinder, new GprcServerServiceImpl(engine, this));
4247
server.Start();
4348
namedPipeServer = server;
@@ -50,6 +55,19 @@ public void Start()
5055
}
5156
}
5257

58+
// Creates a PipeSecurity that allows users read/write access
59+
PipeSecurity CreateSystemIOPipeSecurity()
60+
{
61+
PipeSecurity pipeSecurity = new PipeSecurity();
62+
63+
var id = new SecurityIdentifier(WellKnownSidType.AuthenticatedUserSid, null);
64+
65+
// Allow Everyone read and write access to the pipe.
66+
pipeSecurity.SetAccessRule(new PipeAccessRule(id, PipeAccessRights.ReadWrite, AccessControlType.Allow));
67+
68+
return pipeSecurity;
69+
}
70+
5371
/// <summary>
5472
/// Stops server.
5573
/// </summary>

0 commit comments

Comments
 (0)