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

    https://github.com/apache/zookeeper/pull/450#discussion_r163290119
  
    --- Diff: src/java/main/org/apache/zookeeper/server/persistence/Util.java 
---
    @@ -294,5 +297,25 @@ public int compare(File o1, File o2) {
             Collections.sort(filelist, new DataDirFileComparator(prefix, 
ascending));
             return filelist;
         }
    +
    +    /**
    +     * Returns true if file is a log file.
    +     *
    +     * @param file
    +     * @return
    +     */
    +    public static boolean isLogFile(File file) {
    +        return file.getName().startsWith(LOG_FILE_PREFIX);
    --- End diff --
    
    I agree that it might be safer to check with the dot. I'll add this change.


---

Reply via email to