Commit 51207b6e authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

Detect program name in multizip.

parent 4cf05ec3
......@@ -7,6 +7,7 @@ import (
"github.com/hanwen/go-fuse/zipfs"
"log"
"os"
"path/filepath"
)
var _ = log.Printf
......@@ -16,8 +17,8 @@ func main() {
debug := flag.Bool("debug", false, "debug on")
flag.Parse()
if flag.NArg() < 1 {
// TODO - where to get program name?
fmt.Println("usage: main MOUNTPOINT")
_, prog := filepath.Split(os.Args[0])
fmt.Printf("usage: %s MOUNTPOINT\n", prog)
os.Exit(2)
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment