Browse Source

panic on fs.abs error

tags/v0.9.0
jimzhan 9 years ago
parent
commit
08cdb179a9
1 changed files with 1 additions and 2 deletions
  1. +1
    -2
      server.go

+ 1
- 2
server.go View File

import ( import (
"flag" "flag"
"fmt" "fmt"
"log"
"net/http" "net/http"
"path/filepath" "path/filepath"
"runtime" "runtime"
fs := http.StripPrefix(prefix, http.FileServer(http.Dir(abs))) fs := http.StripPrefix(prefix, http.FileServer(http.Dir(abs)))
self.mux.PathPrefix(prefix).Handler(fs) self.mux.PathPrefix(prefix).Handler(fs)
} else { } else {
log.Fatalf("Failed to setup file server: %v", err)
panic("Failed to setup file server: " + err.Error())
} }
} }



Loading…
Cancel
Save