Skip to content

Commit cba25ca

Browse files
committed
removed duplicate rename function
1 parent 433da00 commit cba25ca

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

internal/file/file_service_operator.go

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -285,23 +285,6 @@ func (fso *FileServiceOperator) UpdateFile(
285285
return fso.sendUpdateFileStream(ctx, fileToUpdate, fso.agentConfig.Client.Grpc.FileChunkSize)
286286
}
287287

288-
func (fso *FileServiceOperator) RenameExternalFile(
289-
ctx context.Context, source, desination string,
290-
) error {
291-
slog.DebugContext(ctx, fmt.Sprintf("Moving file %s to %s (no hash validation)", source, desination))
292-
293-
if err := os.MkdirAll(filepath.Dir(desination), dirPerm); err != nil {
294-
return fmt.Errorf("failed to create directories for %s: %w", desination, err)
295-
}
296-
297-
moveErr := os.Rename(source, desination)
298-
if moveErr != nil {
299-
return fmt.Errorf("failed to move file: %w", moveErr)
300-
}
301-
302-
return nil
303-
}
304-
305288
// renameFile, renames (moves) file from tempDir to new location to update file.
306289
func (fso *FileServiceOperator) RenameFile(
307290
ctx context.Context, source, desination string,

0 commit comments

Comments
 (0)