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

    https://github.com/apache/storm/pull/2893#discussion_r227412685
  
    --- Diff: storm-core/src/native/worker-launcher/impl/worker-launcher.c ---
    @@ -593,14 +593,17 @@ int recursive_delete(const char *path, int 
supervisor_owns_dir) {
         return UNABLE_TO_BUILD_PATH;
       }
     
    +  struct stat file_stat;
    +
       if(access(path, F_OK) != 0) {
         if(errno == ENOENT) {
    -      return 0;
    -    }
    -    // Can probably return here, but we'll try to lstat anyway.
    -  }
    +       // we need to handle symlinks that target missing files.
    +       if((lstat(path, &file_stat) != 0) || ((file_stat.st_mode & S_IFMT) 
!= S_IFLNK)) {
    +         return 0;
    +       }
    --- End diff --
    
    If we fail to `lstat` the path, do we want to log a message as we do below?


---

Reply via email to