Update fs for workspaces

This commit is contained in:
2024-10-14 21:26:31 +02:00
parent 2d2b596f2c
commit 97ebf1c08e
2 changed files with 46 additions and 133 deletions

View File

@@ -21,9 +21,3 @@ func GetWorkspacePath(workspace *models.Workspace) string {
func GetFilePath(workspace *models.Workspace, relativeFilePath string) string {
return filepath.Join(GetWorkspacePath(workspace), relativeFilePath)
}
// EnsureWorkspaceDirectory creates the workspace directory if it doesn't exist
func EnsureWorkspaceDirectory(workspace *models.Workspace) error {
dir := GetWorkspacePath(workspace)
return os.MkdirAll(dir, 0755)
}