Skip to content

Commit

Permalink
fixup! fix: don't follow symlinks when removing junk files (#1638) (#…
Browse files Browse the repository at this point in the history
…1638) (#2470)

code style
  • Loading branch information
ckerr committed Jan 21, 2022
1 parent ddca909 commit 4833723
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libtransmission/torrent.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2122,7 +2122,8 @@ static void removeEmptyFoldersAndJunkFiles(char const* folder)
auto const filename = tr_strvPath(folder, name);

auto info = tr_sys_path_info{};
if (tr_sys_path_get_info(filename.c_str(), TR_SYS_PATH_NO_FOLLOW, &info, nullptr) && info.type == TR_SYS_PATH_IS_DIRECTORY)
if (tr_sys_path_get_info(filename.c_str(), TR_SYS_PATH_NO_FOLLOW, &info, nullptr) &&
info.type == TR_SYS_PATH_IS_DIRECTORY)
{
removeEmptyFoldersAndJunkFiles(filename.c_str());
}
Expand Down

0 comments on commit 4833723

Please sign in to comment.