Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-88

RenameUtil doesn't create create a non-existing destination directory

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • None
    • None
    • logback-core
    • None

    Description

      RenameUtil doesn't handle moving files into non-existing directories in a robust manner. There's no check if the destination directory is available and writable.
      If File.renameTo() fails then it's assumed that this is due to a locked from file. The other reason of a non-existing or non-writable destination directory is not checked (corresponding unit test is attached).

      Here it makes sense to create a non-existing directory tree via File.mkdirs().

      Otherwise the requirement of an existing destination directory should be clearly stated in the documentation of RollingFileAppender.

      Attachments

        Activity

          People

            ceki Ceki Gülcü
            tjuerge Torsten Juergeleit
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: