Skip to content

Commit

Permalink
Refine condition to specify unix domain socket file.
Browse files Browse the repository at this point in the history
  • Loading branch information
harukasan committed Jan 4, 2016
1 parent cd21ac3 commit 5a60cac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion thumberd/thumberd.go
Expand Up @@ -200,7 +200,7 @@ func main() {
http.HandleFunc("/", thumbServer)

if *local != "" { // Run as a local web server
if strings.HasSuffix(*local, ".sock") {
if strings.HasSuffix(*local, ".sock") || strings.HasPrefix(*local, ".") || strings.HasPrefix(*local, "/") {
l, err := net.Listen("unix", *local)
if err != nil {
log.Fatal(err)
Expand Down

0 comments on commit 5a60cac

Please sign in to comment.