Skip to content

Commit

Permalink
display error log
Browse files Browse the repository at this point in the history
  • Loading branch information
iychoi committed Feb 15, 2023
1 parent f58e15a commit f35f5af
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion cmd/subcmd/bput.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,10 @@ func processBputCommand(command *cobra.Command, args []string) error {
defer func() {
unusedStagingDir := commons.GetDefaultStagingDirInTargetPath(targetPath)
logger.Debugf("delete staging dir - %s", unusedStagingDir)
filesystem.RemoveDir(unusedStagingDir, true, true)
err := filesystem.RemoveDir(unusedStagingDir, true, true)
if err != nil {
logger.WithError(err).Warnf("failed to delete staging dir - %s, remove it manually later", unusedStagingDir)
}
}()

bundleTransferManager := commons.NewBundleTransferManager(filesystem, targetPath, maxFileNum, maxFileSize, localTempDirPath, irodsTempDirPath, diff, noHash, progress)
Expand Down
4 changes: 2 additions & 2 deletions commons/bundletransfer.go
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ func (manager *BundleTransferManager) CleanUpBundles() {
// clean up - staging dir
entries, err := manager.filesystem.List(manager.irodsTempDirPath)
if err != nil {
logger.Error(err)
logger.WithError(err).Warnf("failed to listing staging dir %s", manager.irodsTempDirPath)
return
}

Expand All @@ -343,7 +343,7 @@ func (manager *BundleTransferManager) CleanUpBundles() {
if managerID == manager.id {
err := manager.filesystem.RemoveFile(entry.Path, true)
if err != nil {
logger.Error(err)
logger.WithError(err).Warnf("failed to remove bundle file %s", entry.Path)
return
}
}
Expand Down

0 comments on commit f35f5af

Please sign in to comment.