Skip to content

Commit 53a7ef6

Browse files
committed
#1358 : Return null when the drive object is null.
1 parent 4c7f518 commit 53a7ef6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Spe/Core/Provider/PsSitecoreItemProvider.PathHandling.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ public partial class PsSitecoreItemProvider
1616

1717
private Item GetItemForPath(string path)
1818
{
19+
if (PSDriveInfo == null) return null;
20+
1921
var colonIndex = path.IndexOf(':');
2022
var relativePath = path.Substring(colonIndex + 1).Replace('\\', '/');
2123
var databaseName = colonIndex < 0 ? PSDriveInfo.Name : path.Substring(0, colonIndex);

0 commit comments

Comments
 (0)