Merge pull request #2 from nanobox-io/fix/file-names

all names need to have the .json postfix
This commit is contained in:
Steve Domino 2015-10-07 15:25:55 -06:00
commit 2103f90a48

View File

@ -135,7 +135,7 @@ func (d *Driver) read(trans Transaction) error {
dir := d.dir + "/" + trans.Collection
// read record from database
b, err := ioutil.ReadFile(dir + "/" + trans.ResourceID)
b, err := ioutil.ReadFile(dir + "/" + trans.ResourceID + ".json")
if err != nil {
return err
}
@ -187,7 +187,7 @@ func (d *Driver) delete(trans Transaction) error {
dir := d.dir + "/" + trans.Collection
// remove record from database
return os.Remove(dir + "/" + trans.ResourceID)
return os.Remove(dir + "/" + trans.ResourceID + ".json")
}
// helpers