Skip to content

Commit 47b01d5

Browse files
committed
Fix Symlink throwing error with new method call
This seems to be a mono issue not returning the correct value in some cases. mono/mono.posix#45
1 parent 663bab8 commit 47b01d5

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

src/Plugins/Watchers/FSWatcher.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,15 @@ private void LoadWatcherSymlink(string path)
104104
}
105105
}
106106

107-
string realPath = str.ToString(0, count);
107+
string realPath = str.ToString(0, str.Length);
108+
109+
#if DEBUG
110+
if (str.Length != count)
111+
{
112+
Interface.Oxide.LogDebug($"Path {path} returned a symlink at {realPath} but wrong length was reported | {count} != {str.Length}");
113+
}
114+
#endif
115+
108116
string realDirName = Path.GetDirectoryName(realPath);
109117
string realFileName = Path.GetFileName(realPath);
110118

0 commit comments

Comments
 (0)