Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-15845

FileSystemUtils.copyRecursively no longer replaces existing files

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 5.0 RC3
    • Fix Version/s: 5.0 RC4
    • Component/s: Core
    • Labels:
    • Last commented by a User:
      false

      Description

      In 4.3, copyRecursively would replace existing files. In 5.0, the move to Files.copy means that existing files are no longer overwritten and the copy fails with a FileAlreadyExistsException.

      I wonder if this change was intentional (and could perhaps be mentioned in the javadoc), or if using StandardCopyOption.REPLACE_EXISTING would be appropriate.

        Issue Links

          Activity

          Hide
          juergen.hoeller Juergen Hoeller added a comment -

          Good catch...

          Show
          juergen.hoeller Juergen Hoeller added a comment - Good catch...

            People

            • Assignee:
              juergen.hoeller Juergen Hoeller
              Reporter:
              awilkinson Andy Wilkinson
              Last updater:
              St├ęphane Nicoll
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                15 weeks, 1 day ago