From c7279eaa34d9a588bbfbcc99a31b100d34fc97e4 Mon Sep 17 00:00:00 2001
From: chylex <contact@chylex.com>
Date: Tue, 19 Jun 2018 21:32:21 +0200
Subject: [PATCH] Fix bug with falsely detecting symlinks in plugins if a
 file/folder doesn't exist

---
 Plugins/Plugin.cs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Plugins/Plugin.cs b/Plugins/Plugin.cs
index f282f639..1741b56e 100644
--- a/Plugins/Plugin.cs
+++ b/Plugins/Plugin.cs
@@ -88,8 +88,8 @@ public string GetFullPathIfSafe(PluginFolder folder, string relativePath){
                 DirectoryInfo parentInfo = currentInfo.Parent;
 
                 while(parentInfo != null){
-                    if (currentInfo.Attributes.HasFlag(FileAttributes.ReparsePoint)){ // no reason why a plugin should have files/folders with symlinks, junctions, or any other crap
-                        return string.Empty;
+                    if (currentInfo.Exists && currentInfo.Attributes.HasFlag(FileAttributes.ReparsePoint)){
+                        return string.Empty; // no reason why a plugin should have files/folders with symlinks, junctions, or any other crap
                     }
 
                     if (parentInfo.FullName == folderPathName){