Merge pull request '프로젝트 생성 시 이미 해당 파일이 존재 하는지 확인하는 기능' (#155) from jym/250611_02 into main

Reviewed-on: http://220.90.135.190:3000/UVCXR/Studio/pulls/155
This commit was merged in pull request #155.
This commit is contained in:
2025-06-11 16:49:35 +09:00
2 changed files with 25 additions and 2 deletions

View File

@@ -47,7 +47,7 @@ namespace Studio.UI
var projectName = GetProjectName();
var projectPath = GetProjectRoute();
if (!IsProjectNameVaild(projectName) || !IsProjectPathVaild(projectPath))
if (!IsProjectNameVaild(projectName) || !IsProjectPathVaild(projectPath) || !IsProjectExistVaild())
{
return;
}
@@ -95,6 +95,17 @@ namespace Studio.UI
}
return true;
}
private bool IsProjectExistVaild()
{
var projectPath = InputField_ProjectRoute.text;
var projectNameAndExtension = $"{InputField_ProjectName.text}.ocs";
var filePath = Path.Combine(projectPath, projectNameAndExtension);
if (File.Exists(filePath))
{
return false;
}
return true;
}
}
}

View File

@@ -41,7 +41,7 @@ namespace Studio.UI
var projectName = GetProjectName();
var projectPath = GetProjectRoute();
if (!IsProjectNameVaild(projectName) || !IsProjectPathVaild(projectPath))
if (!IsProjectNameVaild(projectName) || !IsProjectPathVaild(projectPath) || !IsProjectExistVaild())
{
return;
}
@@ -87,5 +87,17 @@ namespace Studio.UI
}
return true;
}
private bool IsProjectExistVaild()
{
var projectPath = InputField_ProjectRoute.text;
var projectNameAndExtension = $"{InputField_ProjectName.text}.ocs";
var filePath = Path.Combine(projectPath, projectNameAndExtension);
if (File.Exists(filePath))
{
return false;
}
return true;
}
}
}