source file save-as
Signed-off-by: chcurran <82187351+carlitosan@users.noreply.github.com>
This commit is contained in:
@@ -1764,7 +1764,7 @@ namespace ScriptCanvasEditor
|
||||
AZStd::string suggestedFilename;
|
||||
AZStd::string suggestedFileFilter;
|
||||
bool isValidFileName = false;
|
||||
|
||||
|
||||
if (save == Save::InPlace)
|
||||
{
|
||||
isValidFileName = true;
|
||||
@@ -1773,7 +1773,17 @@ namespace ScriptCanvasEditor
|
||||
}
|
||||
else
|
||||
{
|
||||
GetSuggestedFullFilenameToSaveAs(inMemoryAssetId, suggestedFilename, suggestedFileFilter);
|
||||
// replaces GetSuggestedFullFilenameToSaveAs
|
||||
suggestedFileFilter = ScriptCanvasAssetDescription().GetExtensionImpl();
|
||||
|
||||
if (inMemoryAssetId.Path().empty())
|
||||
{
|
||||
suggestedFilename = ScriptCanvasAssetDescription().GetSuggestedSavePathImpl();
|
||||
}
|
||||
else
|
||||
{
|
||||
suggestedFilename = inMemoryAssetId.Path();
|
||||
}
|
||||
}
|
||||
|
||||
EnsureSaveDestinationDirectory(suggestedFilename);
|
||||
@@ -1788,7 +1798,14 @@ namespace ScriptCanvasEditor
|
||||
// So we want to break out.
|
||||
if (!selectedFile.isEmpty())
|
||||
{
|
||||
ScriptCanvasAssetDescription assetDescription;
|
||||
AZStd::string filePath = selectedFile.toUtf8().data();
|
||||
|
||||
if (!AZ::StringFunc::EndsWith(filePath, assetDescription.GetExtensionImpl(), false))
|
||||
{
|
||||
filePath += assetDescription.GetExtensionImpl();
|
||||
}
|
||||
|
||||
AZStd::string fileName;
|
||||
|
||||
// Verify that the path is within the project
|
||||
|
||||
Reference in New Issue
Block a user