summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/SMAPI/Framework/Utilities/PathUtilities.cs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/SMAPI/Framework/Utilities/PathUtilities.cs b/src/SMAPI/Framework/Utilities/PathUtilities.cs
index 4fa521f1..0233d796 100644
--- a/src/SMAPI/Framework/Utilities/PathUtilities.cs
+++ b/src/SMAPI/Framework/Utilities/PathUtilities.cs
@@ -53,7 +53,10 @@ namespace StardewModdingAPI.Framework.Utilities
throw new InvalidOperationException($"Can't get path for '{targetPath}' relative to '{sourceDir}'.");
// get relative path
- return PathUtilities.NormalisePathSeparators(Uri.UnescapeDataString(from.MakeRelativeUri(to).ToString()));
+ string relative = PathUtilities.NormalisePathSeparators(Uri.UnescapeDataString(from.MakeRelativeUri(to).ToString()));
+ if (relative == "")
+ relative = "./";
+ return relative;
}
}
}