@@ 85,13 85,13 @@ Snow leopards are one of the best animals, and I'm here to share them with you.
// do the final culminating posts
// open old and new indexes
- geminiOrig, err := os.Open("/var/gemini/nytpu.com/sneps/index.gmi")
+ geminiOrig, err := os.Open("/var/local/sneps/index.gmi")
if err != nil {
fmt.Println("Failed to open file: ", err)
os.Exit(1)
}
defer geminiOrig.Close()
- geminiNew, err := os.OpenFile("/var/gemini/nytpu.com/sneps/index.gmi.new", os.O_RDWR|os.O_CREATE, 0666)
+ geminiNew, err := os.OpenFile("/var/local/sneps/index.gmi.new", os.O_RDWR|os.O_CREATE, 0666)
if err != nil {
fmt.Println("Failed to open file: ", err)
os.Exit(1)
@@ 125,7 125,7 @@ Snow leopards are one of the best animals, and I'm here to share them with you.
os.Exit(1)
}
// move new to old once writing is confirmed to have been successful
- err = os.Rename("/var/gemini/nytpu.com/sneps/index.gmi.new", "/var/gemini/nytpu.com/sneps/index.gmi")
+ err = os.Rename("/var/local/sneps/index.gmi.new", "/var/local/sneps/index.gmi")
if err != nil {
fmt.Println("Failed to move file: ", err)
os.Exit(1)
@@ 143,8 143,10 @@ Snow leopards are one of the best animals, and I'm here to share them with you.
os.Exit(1)
}
+ /*
err = os.Rename(filename, fmt.Sprintf("/var/gemini/nytpu.com/sneps/D%03d.jpg", day))
if err != nil {
fmt.Printf("Failed to rename \"%v\": %v", filename, err)
}
+ */
}