MCPcopy Create free account
hub / github.com/dnote/dnote / clearBackup

Function clearBackup

pkg/cli/migrate/legacy.go:211–219  ·  view source on GitHub ↗
(ctx context.DnoteCtx)

Source from the content-addressed store, hash-verified

209}
210
211func clearBackup(ctx context.DnoteCtx) error {
212 backupPath := fmt.Sprintf("%s/%s", ctx.Paths.Home, backupDirName)
213
214 if err := os.RemoveAll(backupPath); err != nil {
215 return errors.Wrapf(err, "Failed to remove backup at %s", backupPath)
216 }
217
218 return nil
219}
220
221// getSchemaPath returns the path to the file containing schema info
222func getSchemaPath(ctx context.DnoteCtx) string {

Callers 1

performMigrationFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected