엉뚱한곳에 버전을 저장하는 버그 수정

This commit is contained in:
김판돌 2023-11-25 17:48:39 +09:00
parent 063f2f0da6
commit b4064c3bf9
1 changed files with 4 additions and 5 deletions

View File

@ -99,10 +99,10 @@ namespace Server.Git
//초기세팅일 경우 데이터를 받아오고 아닐경우 데이터를저장
if(ProtocolProcessor.version == "")
{
string versionFilePath = Path.Combine(repositoryPath, "version");
string versionFilePath = Path.Combine(repositoryPath, @"/version.txt");
if (File.Exists(versionFilePath))
{
using (StreamReader reader = new StreamReader(repositoryPath + @"version"))
using (StreamReader reader = new StreamReader(repositoryPath + @"/version.txt"))
{
ProtocolProcessor.version = reader.ReadToEnd();
}
@ -116,13 +116,12 @@ namespace Server.Git
}
else
{
using (StreamWriter writer = new StreamWriter(repositoryPath + @"version"))
using (StreamWriter writer = new StreamWriter(repositoryPath + @"/version.txt"))
{
writer.Write(ProtocolProcessor.version);
logger.Info("saveVersion");
}
//버전 정보가 있을때만 커밋
// 스테이징
RepositorySet("add .", repositoryPath);