Fix the classic a[len(a)] mistake
1 files changed, 1 insertions(+), 1 deletions(-) M main.go
M main.go +1 -1
@@ 18,7 18,7 @@ func main() { ctx.String("Port=%d, Directory=%s", argv.Port, argv.Directory) // Add a slash at the end of the directory path in case the user // didn't do so - if argv.Directory[len(argv.Directory)] != '/' { + if argv.Directory[len(argv.Directory) - 1] != '/' { argv.Directory += "/" } serve(argv.Port, argv.Directory)