Skip to content

Commit 41bdc0c

Browse files
committed
v3.3.9602.0
1 parent d8b65ed commit 41bdc0c

File tree

5 files changed

+10
-8
lines changed

5 files changed

+10
-8
lines changed

Common/Common.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
<Description>Contains functionality common for all Virtual Drive samples, both for Windows and macOS.</Description>
99
</PropertyGroup>
1010
<ItemGroup>
11-
<PackageReference Include="ITHit.FileSystem" Version="3.3.9488.0" />
11+
<PackageReference Include="ITHit.FileSystem" Version="3.3.9602.0" />
1212
</ItemGroup>
1313
</Project>

Windows/Common/Common.Windows.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<PackageReference Include="Microsoft.Windows.SDK.Contracts" Version="10.0.19041.1" />
1313
</ItemGroup>
1414
<ItemGroup>
15-
<PackageReference Include="ITHit.FileSystem.Windows" Version="3.3.9488.0" />
15+
<PackageReference Include="ITHit.FileSystem.Windows" Version="3.3.9602.0" />
1616
<ProjectReference Include="..\..\Common\Common.csproj" />
1717
</ItemGroup>
1818
</Project>

Windows/VirtualDrive/VirtualDrive/VirtualDrive.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ This is an advanced project with ETags support, Microsoft Office documents editi
2929
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="5.0.0" />
3030
</ItemGroup>
3131
<ItemGroup>
32-
<PackageReference Include="ITHit.FileSystem.Windows" Version="3.3.9488.0" />
32+
<PackageReference Include="ITHit.FileSystem.Windows" Version="3.3.9602.0" />
3333
<ProjectReference Include="..\..\Common\Common.Windows.csproj" />
3434
</ItemGroup>
3535
<ItemGroup>

Windows/VirtualFileSystem/VirtualFileSystem.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ This project does not support ETags, locking, Microsoft Office documents editing
3636
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="3.1.7" />
3737
</ItemGroup>
3838
<ItemGroup>
39-
<PackageReference Include="ITHit.FileSystem.Windows" Version="3.3.9488.0" />
39+
<PackageReference Include="ITHit.FileSystem.Windows" Version="3.3.9602.0" />
4040
<ProjectReference Include="..\Common\Common.Windows.csproj" />
4141
</ItemGroup>
4242
<ItemGroup>

Windows/VirtualFileSystem/VirtualFileSystemItem.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,14 @@ public async Task MoveToAsync(string userFileSystemNewPath, byte[] newParentItem
6969
Logger.LogMessage($"{nameof(IFileSystemItem)}.{nameof(MoveToAsync)}()", userFileSystemOldPath, userFileSystemNewPath);
7070

7171
string remoteStorageOldPath = RemoteStoragePath;
72-
string remoteStorageNewParentPath = WindowsFileSystemItem.GetPathByItemId(newParentItemId);
73-
string remoteStorageNewPath = Path.Combine(remoteStorageNewParentPath, Path.GetFileName(userFileSystemNewPath));
74-
7572
FileSystemInfo remoteStorageOldItem = FsPath.GetFileSystemItem(remoteStorageOldPath);
76-
if (remoteStorageOldItem != null)
73+
74+
// newParentItemId is null if the hydrated file is moved outside of the virtual file system, for example to the recycle bin.
75+
if ( (remoteStorageOldItem != null) && (newParentItemId != null) )
7776
{
77+
string remoteStorageNewParentPath = WindowsFileSystemItem.GetPathByItemId(newParentItemId);
78+
string remoteStorageNewPath = Path.Combine(remoteStorageNewParentPath, Path.GetFileName(userFileSystemNewPath));
79+
7880
if (remoteStorageOldItem is FileInfo)
7981
{
8082
(remoteStorageOldItem as FileInfo).MoveTo(remoteStorageNewPath, true);

0 commit comments

Comments
 (0)