Merge pull request #56101 from raulsntos/fix-56095
Check a `.csproj` exists before trying to edit it
This commit is contained in:
commit
84d1ceaa96
1 changed files with 14 additions and 6 deletions
|
@ -164,21 +164,29 @@ namespace GodotTools
|
||||||
private void _FileSystemDockFileRemoved(string file)
|
private void _FileSystemDockFileRemoved(string file)
|
||||||
{
|
{
|
||||||
if (Path.GetExtension(file) == Internal.CSharpLanguageExtension)
|
if (Path.GetExtension(file) == Internal.CSharpLanguageExtension)
|
||||||
|
{
|
||||||
ProjectUtils.RemoveItemFromProjectChecked(GodotSharpDirs.ProjectCsProjPath, "Compile",
|
ProjectUtils.RemoveItemFromProjectChecked(GodotSharpDirs.ProjectCsProjPath, "Compile",
|
||||||
ProjectSettings.GlobalizePath(file));
|
ProjectSettings.GlobalizePath(file));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void _FileSystemDockFolderMoved(string oldFolder, string newFolder)
|
private void _FileSystemDockFolderMoved(string oldFolder, string newFolder)
|
||||||
|
{
|
||||||
|
if (File.Exists(GodotSharpDirs.ProjectCsProjPath))
|
||||||
{
|
{
|
||||||
ProjectUtils.RenameItemsToNewFolderInProjectChecked(GodotSharpDirs.ProjectCsProjPath, "Compile",
|
ProjectUtils.RenameItemsToNewFolderInProjectChecked(GodotSharpDirs.ProjectCsProjPath, "Compile",
|
||||||
ProjectSettings.GlobalizePath(oldFolder), ProjectSettings.GlobalizePath(newFolder));
|
ProjectSettings.GlobalizePath(oldFolder), ProjectSettings.GlobalizePath(newFolder));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void _FileSystemDockFolderRemoved(string oldFolder)
|
private void _FileSystemDockFolderRemoved(string oldFolder)
|
||||||
|
{
|
||||||
|
if (File.Exists(GodotSharpDirs.ProjectCsProjPath))
|
||||||
{
|
{
|
||||||
ProjectUtils.RemoveItemsInFolderFromProjectChecked(GodotSharpDirs.ProjectCsProjPath, "Compile",
|
ProjectUtils.RemoveItemsInFolderFromProjectChecked(GodotSharpDirs.ProjectCsProjPath, "Compile",
|
||||||
ProjectSettings.GlobalizePath(oldFolder));
|
ProjectSettings.GlobalizePath(oldFolder));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public override void _Ready()
|
public override void _Ready()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue