Include symlink size (path length) in Get_Folder_Size()
All we have to do is check for the case of a symlink as well. st.st_size contains the length of the path the symlink points to. Change-Id: I9a7b06ba11b5866e04599b8904fd42acf241abe2
This commit is contained in:
committed by
Dees Troy
parent
d73903c8eb
commit
1efebdc0bd
@@ -81,7 +81,7 @@ uint64_t TWExclude::Get_Folder_Size(const string& Path) {
|
||||
}
|
||||
if ((st.st_mode & S_IFDIR) && !check_skip_dirs(FullPath) && de->d_type != DT_SOCK) {
|
||||
dusize += Get_Folder_Size(FullPath);
|
||||
} else if (st.st_mode & S_IFREG) {
|
||||
} else if (st.st_mode & S_IFREG || st.st_mode & S_IFLNK) {
|
||||
dusize += (uint64_t)(st.st_size);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user