]> Cypherpunks.ru repositories - nncp.git/blobdiff - src/ctx.go
Move .seen and .hdr to subdirectories
[nncp.git] / src / ctx.go
index b1b590b351fa9169805222cdabda34a2276b3a2d..cfbe1b57d3b3e9dbfabcfa8a277d7f198cc9118e 100644 (file)
@@ -69,7 +69,8 @@ func (ctx *Ctx) FindNode(id string) (*Node, error) {
        return node, nil
 }
 
-func ensureDir(p string) error {
+func ensureDir(dirs ...string) error {
+       p := filepath.Join(dirs...)
        fi, err := os.Stat(p)
        if err == nil {
                if fi.IsDir() {