Remove use of container/vector
authorRobert Sesek <rsesek@bluestatic.org>
Tue, 3 Apr 2012 12:56:28 +0000 (08:56 -0400)
committerRobert Sesek <rsesek@bluestatic.org>
Tue, 3 Apr 2012 13:32:06 +0000 (09:32 -0400)
server/paths.go

index b0358dacc324d4cd7db355d0c556765fc9de76a8..b18359e5b28c2053d74001dd4459e07ac3441373 100644 (file)
@@ -11,7 +11,6 @@ package server
 
 import (
        "../config"
-       "container/vector"
        "errors"
        "os"
        "path"
@@ -48,7 +47,7 @@ func IsValid(path string) (bool, string) {
        return err == nil && checkInJail(path), path
 }
 
-func List(the_path string) (files vector.StringVector, err error) {
+func List(the_path string) (files []string, err error) {
        full_path := canonicalizePath(the_path)
        if !checkInJail(full_path) {
                return nil, errors.New("Path outside of jail")
@@ -73,7 +72,7 @@ func List(the_path string) (files vector.StringVector, err error) {
                if !gConfig.IncludeDotfiles && name[0] == '.' {
                        continue
                }
-               files.Push(name)
+               files = append(files, name)
        }
        return files, nil
 }