diff --git a/storage/storage.go b/storage/storage.go index 79079fe..efb1db9 100644 --- a/storage/storage.go +++ b/storage/storage.go @@ -28,12 +28,6 @@ func (sp FileSystemStorageProvider) storeRaw(bucketName string, objectName strin } func (sp FileSystemStorageProvider) storeExisting(bucketName string, objectName string, existingFilePath string) { - directoryPath := filepath.Join(sp.basePath, bucketName) - - sp.fileSystem.MkdirAll(directoryPath, os.ModePerm) - - filePath := filepath.Join(directoryPath, objectName) - bytesRead, _ := afero.ReadFile(sp.fileSystem, existingFilePath) - afero.WriteFile(sp.fileSystem, filePath, bytesRead, os.ModePerm) + sp.storeRaw(bucketName, objectName, bytesRead) }