1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-05 17:15:09 +00:00

Merge pull request #56101 from raulsntos/fix-56095

Check a `.csproj` exists before trying to edit it
This commit is contained in:
Rémi Verschelde
2021-12-21 00:08:23 +01:00
committed by GitHub

View File

@@ -164,21 +164,29 @@ namespace GodotTools
private void _FileSystemDockFileRemoved(string file)
{
if (Path.GetExtension(file) == Internal.CSharpLanguageExtension)
{
ProjectUtils.RemoveItemFromProjectChecked(GodotSharpDirs.ProjectCsProjPath, "Compile",
ProjectSettings.GlobalizePath(file));
}
}
private void _FileSystemDockFolderMoved(string oldFolder, string newFolder)
{
if (File.Exists(GodotSharpDirs.ProjectCsProjPath))
{
ProjectUtils.RenameItemsToNewFolderInProjectChecked(GodotSharpDirs.ProjectCsProjPath, "Compile",
ProjectSettings.GlobalizePath(oldFolder), ProjectSettings.GlobalizePath(newFolder));
}
}
private void _FileSystemDockFolderRemoved(string oldFolder)
{
if (File.Exists(GodotSharpDirs.ProjectCsProjPath))
{
ProjectUtils.RemoveItemsInFolderFromProjectChecked(GodotSharpDirs.ProjectCsProjPath, "Compile",
ProjectSettings.GlobalizePath(oldFolder));
}
}
public override void _Ready()
{