Skip to content

Commit fa9e96e

Browse files
author
Benoit Hudson
committed
Handle relative path passed to converting a full path to relative.
Maybe I should throw instead? Whatever; this fixes a test I'm about to commit.
1 parent 8efdd03 commit fa9e96e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Assets/FbxExporters/Editor/FbxExportSettings.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,9 @@ public static void SetRelativeSavePath(string newPath) {
207207
/// </summary>
208208
public static string ConvertToAssetRelativePath(string fullPathInAssets, bool requireSubdirectory = true)
209209
{
210+
if (!Path.IsPathRooted(fullPathInAssets)) {
211+
fullPathInAssets = Path.GetFullPath(fullPathInAssets);
212+
}
210213
var relativePath = GetRelativePath(Application.dataPath, fullPathInAssets);
211214
if (requireSubdirectory && relativePath.StartsWith("..")) {
212215
if (relativePath.Length == 2 || relativePath[2] == '/') {

0 commit comments

Comments
 (0)