[JIRA] Created: (LBCORE-151) RenameUtil doesn't create create a non-existing destination directory

RenameUtil doesn't create create a non-existing destination directory --------------------------------------------------------------------- Key: LBCORE-151 URL: http://jira.qos.ch/browse/LBCORE-151 Project: logback-core Issue Type: Bug Components: Rolling Affects Versions: 0.9.20 Reporter: Torsten Juergeleit Assignee: Logback dev list 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. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCORE-151?page=com.atlassian.jira.plugin.system.i... ] Torsten Juergeleit updated LBCORE-151: -------------------------------------- Attachment: RenameUtilTest.java unit test for rename to non-existing directory
RenameUtil doesn't create create a non-existing destination directory ---------------------------------------------------------------------
Key: LBCORE-151 URL: http://jira.qos.ch/browse/LBCORE-151 Project: logback-core Issue Type: Bug Components: Rolling Affects Versions: 0.9.20 Reporter: Torsten Juergeleit Assignee: Ceki Gulcu Attachments: RenameUtilTest.java
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.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCORE-151?page=com.atlassian.jira.plugin.system.i... ] Torsten Juergeleit updated LBCORE-151: -------------------------------------- Attachment: (was: RenameUtilTest.java)
RenameUtil doesn't create create a non-existing destination directory ---------------------------------------------------------------------
Key: LBCORE-151 URL: http://jira.qos.ch/browse/LBCORE-151 Project: logback-core Issue Type: Bug Components: Rolling Affects Versions: 0.9.20 Reporter: Torsten Juergeleit Assignee: Ceki Gulcu
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.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCORE-151?page=com.atlassian.jira.plugin.system.i... ] Torsten Juergeleit updated LBCORE-151: -------------------------------------- Attachment: RenameUtilTest.java fixed the unit test that it tests RenameUtils instead of File :-)
RenameUtil doesn't create create a non-existing destination directory ---------------------------------------------------------------------
Key: LBCORE-151 URL: http://jira.qos.ch/browse/LBCORE-151 Project: logback-core Issue Type: Bug Components: Rolling Affects Versions: 0.9.20 Reporter: Torsten Juergeleit Assignee: Ceki Gulcu Attachments: RenameUtilTest.java
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.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCORE-151?page=com.atlassian.jira.plugin.system.i... ] Torsten Juergeleit updated LBCORE-151: -------------------------------------- Comment: was deleted
RenameUtil doesn't create create a non-existing destination directory ---------------------------------------------------------------------
Key: LBCORE-151 URL: http://jira.qos.ch/browse/LBCORE-151 Project: logback-core Issue Type: Bug Components: Rolling Affects Versions: 0.9.20 Reporter: Torsten Juergeleit Assignee: Ceki Gulcu Attachments: RenameUtilTest.java
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.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCORE-151?page=com.atlassian.jira.plugin.system.i... ] Ceki Gulcu resolved LBCORE-151. ------------------------------- Fix Version/s: unspecified Resolution: Fixed Torsten, Many thanks for reporting this bug. It was fixed in a recent commit. See http://github.com/ceki/logback/commit/729c58c5a6be3022f463a3f6 for more details.
RenameUtil doesn't create create a non-existing destination directory ---------------------------------------------------------------------
Key: LBCORE-151 URL: http://jira.qos.ch/browse/LBCORE-151 Project: logback-core Issue Type: Bug Components: Rolling Affects Versions: 0.9.20 Reporter: Torsten Juergeleit Assignee: Ceki Gulcu Fix For: unspecified
Attachments: RenameUtilTest.java
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.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
participants (2)
-
Ceki Gulcu (JIRA)
-
Torsten Juergeleit (JIRA)