Commit 1efebdc0 authored by James Christopher Adduono's avatar James Christopher Adduono Committed by Dees Troy

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
parent d73903c8
......@@ -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);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment