Github user d2r commented on a diff in the pull request: https://github.com/apache/storm/pull/2893#discussion_r227445654 --- 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 -- Thanks. And I like that you have text that differentiates this from the other `lstat` error case.
---