Skip to content

Commit

Permalink
#1358 : Return null when the drive object is null.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaellwest committed Sep 19, 2024
1 parent 4c7f518 commit 53a7ef6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Spe/Core/Provider/PsSitecoreItemProvider.PathHandling.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ public partial class PsSitecoreItemProvider

private Item GetItemForPath(string path)
{
if (PSDriveInfo == null) return null;

var colonIndex = path.IndexOf(':');
var relativePath = path.Substring(colonIndex + 1).Replace('\\', '/');
var databaseName = colonIndex < 0 ? PSDriveInfo.Name : path.Substring(0, colonIndex);
Expand Down

0 comments on commit 53a7ef6

Please sign in to comment.