add "temp" for temporary projects

Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
This commit is contained in:
Hadi
2026-05-20 13:39:11 +02:00
parent 4251e4fb2a
commit 1bb547870e
+2 -2
View File
@@ -138,14 +138,14 @@ func sanitizeName(s string) string {
}
func IsValidProjectName(s string) bool {
if s == "tmp" {
if s == "tmp" || s == "temp" || s == "temporary" {
return true
}
return s != "" && s == sanitizeName(s)
}
func OpenProject(projectDir, name string) (*Project, error) {
if name == "tmp" {
if name == "tmp" || name == "temp" || name == "temporary" {
dir := tempDir()
if err := os.MkdirAll(dir, 0o755); err != nil {
return nil, err