Kaynağa Gözat

fix #2139

Database backup filenames contained a colon character, which is disallowed
on Windows; use period instead
pull/2140/head
Shivaram Lingamneni 1 ay önce
ebeveyn
işleme
3d2f014d4c
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  1. 1
    1
      irc/database.go

+ 1
- 1
irc/database.go Dosyayı Görüntüle

150
 func performAutoUpgrade(currentVersion int, config *Config) (err error) {
150
 func performAutoUpgrade(currentVersion int, config *Config) (err error) {
151
 	path := config.Datastore.Path
151
 	path := config.Datastore.Path
152
 	log.Printf("attempting to auto-upgrade schema from version %d to %d\n", currentVersion, latestDbSchema)
152
 	log.Printf("attempting to auto-upgrade schema from version %d to %d\n", currentVersion, latestDbSchema)
153
-	timestamp := time.Now().UTC().Format("2006-01-02-15:04:05.000Z")
153
+	timestamp := time.Now().UTC().Format("2006-01-02-15.04.05.000Z")
154
 	backupPath := fmt.Sprintf("%s.v%d.%s.bak", path, currentVersion, timestamp)
154
 	backupPath := fmt.Sprintf("%s.v%d.%s.bak", path, currentVersion, timestamp)
155
 	log.Printf("making a backup of current database at %s\n", backupPath)
155
 	log.Printf("making a backup of current database at %s\n", backupPath)
156
 	err = utils.CopyFile(path, backupPath)
156
 	err = utils.CopyFile(path, backupPath)

Loading…
İptal
Kaydet