Fix failure to delete function when function's file doesn't exist (#118)
This commit is contained in:
committed by
Soam Vasani
parent
858fe9f62b
commit
14c55912f5
@@ -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")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user