UnnoTed / fileb0x

a better customizable tool to embed files in go; also update embedded files remotely without restarting the server
MIT License
634 stars 53 forks source link

An attempt is made to create the root directory #11

Closed nathan-osman closed 7 years ago

nathan-osman commented 7 years ago

My directory structure looks something like this:

.
├── b0x.yaml
└── server
    ├── ab0x.go
    └── static
        └── css
            └── styles.min.css

b0x.yaml contains the following:

pkg: server
dest: server
compression:
  compress: true
custom:
  - files:
    - server/static
    base: server

However, when I generate server/ab0x.go, the following is added to init():

err = FS.Mkdir(CTX, "/", 0777)
if err != nil {
  log.Fatal(err)
}

This is a problem because attempting to create the root directory results in an error.

nathan-osman commented 7 years ago

I have found a workaround in the meantime:

prefix: static
base: server/static
UnnoTed commented 7 years ago

Hi, thanks for reporting this issue, please do a go get -u github.com/UnnoTed/fileb0x and try again without the workaround.

nathan-osman commented 7 years ago

Seems to work now, thanks!