Browse Source

undo file validation

Signed-off-by: r2k1 <yokree@gmail.com>
r2k1 3 years ago
parent
commit
edceb9b042
1 changed files with 3 additions and 7 deletions
  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"):
 	case strings.Contains(path, "blob.core.windows.net"):
 		return NewAzureBlobFile(path)
 		return NewAzureBlobFile(path)
 	default:
 	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()
 	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 {
 type SystemFile struct {