Fix issue with copying and poasting in same folder.

This commit is contained in:
Chandler Cox
2023-09-21 18:56:45 -05:00
parent 97ed46bc4f
commit 521b180352

View File

@@ -722,7 +722,12 @@ namespace FlaxEditor.Windows
{
var item = Editor.ContentDatabase.Find(sourcePath);
if (item != null)
Editor.ContentDatabase.Copy(item, Path.Combine(CurrentViewFolder.Path, item.FileName));
{
var newPath = StringUtils.NormalizePath(Path.Combine(CurrentViewFolder.Path, item.FileName));
if (sourcePath.Equals(newPath))
newPath = GetClonedAssetPath(item);
Editor.ContentDatabase.Copy(item, newPath);
}
else
importFiles.Add(sourcePath);
}