MCPcopy Create free account
hub / github.com/WendellCraft/ModpackDebuggerKit / SaveProject

Method SaveProject

app.go:243–260  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

241}
242
243func (a *App) SaveProject() error {
244 a.mu.Lock()
245 if a.ActiveScan {
246 a.mu.Unlock()
247 return fmt.Errorf("cannot save project during an active debug session")
248 }
249 if a.ProjectData.ModsDir == "" {
250 a.mu.Unlock()
251 return fmt.Errorf("no mod folder selected")
252 }
253 filePath := a.ProjectFilePath
254 a.mu.Unlock()
255
256 if filePath != "" {
257 return a.saveToFile(filePath)
258 }
259 return a.SaveProjectAs()
260}
261
262func (a *App) SaveProjectAs() error {
263 a.mu.Lock()

Callers 1

onBeforeCloseMethod · 0.95

Calls 2

saveToFileMethod · 0.95
SaveProjectAsMethod · 0.95

Tested by

no test coverage detected