reworking database, init and add commands
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/deranjer/gvc/common/database"
|
||||
@@ -95,6 +96,11 @@ func ConvertFileForStorage(file *database.File, folder string) error {
|
||||
return err
|
||||
}
|
||||
fmt.Println("REMOVE: ", fileBytes)
|
||||
filename := folder + string(filepath.Separator) + file.Name
|
||||
err = ioutil.WriteFile(filename, fileBytes, 0666)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user