You've already forked godot
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:
@@ -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()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user