diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp index aabf83e..2ff6b3c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -642,7 +642,9 @@ int initProject(int argc, const _tinydir_char_t **argv) if(!fileOverwriteResult) fout << "Warning: Failed to create project file: " << toFileString(fileOverwriteResult.getErrMsg()) << endl; } - gitInitProject(projectPath); + auto gitProjDir = projectPath + TINYDIR_STRING("/.git"); + if(getFileType(gitProjDir.c_str()) != FileType::FILE_NOT_FOUND) + gitInitProject(projectPath); return 0; } |