Dump to bugs subdirectory

pull/3149/head
Kegan Dougal 2017-02-06 14:56:06 +00:00
parent af765c7522
commit d4247e0179
1 changed files with 1 additions and 0 deletions

View File

@ -37,6 +37,7 @@ func respond(code int, w http.ResponseWriter) {
}
func gzipAndSave(data []byte, filepath string) error {
filepath = "bugs/" + filepath
if _, err := os.Stat(filepath); err == nil {
return fmt.Errorf("file already exists") // the user can just retry
}