Fix failure to delete function when function's file doesn't exist (#118)

This commit is contained in:
Ta-Ching Chen
2017-02-10 23:38:13 -08:00
committed by Soam Vasani
parent 858fe9f62b
commit 14c55912f5
+3
View File
@@ -86,6 +86,9 @@ func (fs *FileStore) fileStoreService() {
response.error = ioutil.WriteFile(path.Join(fs.root, req.fileName), req.fileContents, 0600)
case DELETE:
response.error = os.Remove(path.Join(fs.root, req.fileName))
if os.IsNotExist(response.error) {
response.error = nil
}
default:
log.Panic("bad request")
}