Skip to content

Commit

Permalink
remove now redundant function 'pasteFile'
Browse files Browse the repository at this point in the history
  • Loading branch information
sahinfalcon committed Dec 20, 2024
1 parent 4e3deaa commit 6f1be2f
Showing 1 changed file with 0 additions and 30 deletions.
30 changes: 0 additions & 30 deletions src/internal/function.go
Original file line number Diff line number Diff line change
Expand Up @@ -284,36 +284,6 @@ func renameIfDuplicate(destination string) (string, error) {
}
}

func pasteFile(src string, dst string) error {
srcFile, err := os.Open(src)
if err != nil {
outPutLog("Paste file function open file error", err)
}
defer srcFile.Close()

dst, err = renameIfDuplicate(dst)
if err != nil {
outPutLog("Paste file function rename error", err)
}
dstFile, err := os.Create(dst)
if err != nil {
outPutLog("Paste file function create file error", err)
}
if err != nil {
return err
}
defer dstFile.Close()

_, err = io.Copy(dstFile, srcFile)
if err != nil {
outPutLog("Paste file function copy file error", err)
}
if err != nil {
return err
}
return nil
}

func (m *model) returnMetaData() {
panel := m.fileModel.filePanels[m.filePanelFocusIndex]
cursor := panel.cursor
Expand Down

0 comments on commit 6f1be2f

Please sign in to comment.