* Write tar header for a directory. If the entry in statbuf is a link then * write it as a directory anyway. */
| 2072 | * write it as a directory anyway. |
| 2073 | */ |
| 2074 | static int64 |
| 2075 | _tarWriteDir(const char *pathbuf, int basepathlen, struct stat *statbuf, |
| 2076 | bool sizeonly) |
| 2077 | { |
| 2078 | /* If symlink, write it as a directory anyway */ |
| 2079 | #ifndef WIN32 |
| 2080 | if (S_ISLNK(statbuf->st_mode)) |
| 2081 | #else |
| 2082 | if (pgwin32_is_junction(pathbuf)) |
| 2083 | #endif |
| 2084 | statbuf->st_mode = S_IFDIR | pg_dir_create_mode; |
| 2085 | |
| 2086 | return _tarWriteHeader(pathbuf + basepathlen + 1, NULL, statbuf, sizeonly); |
| 2087 | } |
| 2088 | |
| 2089 | /* |
| 2090 | * Increment the network transfer counter by the given number of bytes, |
no test coverage detected