osdir.com

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GitHub] activemq-artemis pull request #2222: ARTEMIS-2014 Treat inability to create ...


Github user clebertsuconic commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/2222#discussion_r208296624
  
    --- Diff: artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/AbstractSequentialFileFactory.java ---
    @@ -224,8 +224,10 @@ public void releaseBuffer(final ByteBuffer buffer) {
        @Override
        public void createDirs() throws Exception {
           boolean ok = journalDir.mkdirs();
    -      if (!ok) {
    -         throw new IOException("Failed to create directory " + journalDir);
    +      if (!ok && !journalDir.exists()) {
    --- End diff --
    
    shouldn't this be ||
    
    if !ok.. and directory exists.. shouldn't this throw an error?
    
    and how home mkdirs worked and the directory did not exist?


---