Răsfoiți Sursa

undo file validation

Signed-off-by: r2k1 <yokree@gmail.com>
r2k1 3 ani în urmă
părinte
comite
edceb9b042
1 a modificat fișierele cu 3 adăugiri și 7 ștergeri
  1. 3 7
      pkg/filemanager/filemanager.go

+ 3 - 7
pkg/filemanager/filemanager.go

@@ -43,7 +43,7 @@ func NewFileManager(path string) (FileManager, error) {
 	case strings.Contains(path, "blob.core.windows.net"):
 		return NewAzureBlobFile(path)
 	default:
-		return NewSystemFile(path)
+		return NewSystemFile(path), nil
 	}
 }
 
@@ -180,12 +180,8 @@ func (g *GCSStorageFile) Upload(ctx context.Context, f *os.File) error {
 	return w.Close()
 }
 
-func NewSystemFile(path string) (*SystemFile, error) {
-	// validate path
-	//if !fs.ValidPath(path) {
-	//	return nil, fmt.Errorf("invalid path: %s", path)
-	//}
-	return &SystemFile{path: path}, nil
+func NewSystemFile(path string) *SystemFile {
+	return &SystemFile{path: path}
 }
 
 type SystemFile struct {