Skip to content

Commit 98febfa

Browse files
author
Dmitriy Yukhanov
committed
Fix incorrect path processing
It was malformed in case package was exported not from the Assets folder
1 parent d5f3524 commit 98febfa

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

Unity Projects/Package2Folder Master/Assets/Plugins/CodeStage/Package2Folder/Scripts/Package2Folder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ public static void ImportPackageToFolder(string packagePath, string selectedFold
183183
private static void ChangeAssetItemPath(object assetItem, string selectedFolderPath)
184184
{
185185
var destinationPath = (string)DestinationAssetPathFieldInfo.GetValue(assetItem);
186-
destinationPath = selectedFolderPath + destinationPath.Remove(0, 6);
186+
destinationPath = selectedFolderPath + destinationPath.Remove(0, destinationPath.IndexOf('/'));
187187
DestinationAssetPathFieldInfo.SetValue(assetItem, destinationPath);
188188
}
189189
#if CS_P2F_NEW_ARGUMENT_2

Unity Projects/Package2Folder Master/Assets/Plugins/CodeStage/Package2Folder/changelog.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
1.0.4
2+
- fix incorrect path processing in case package was exported not from the Assets folder (thx vestigialdev)
3+
14
1.0.3
25
- fix reflection errors in Unity 2019.3+ (thx viktorkadza)
36

0 commit comments

Comments
 (0)