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
diff --git a/exclude.cpp b/exclude.cpp
index f992ecf..789c246 100644
--- a/exclude.cpp
+++ b/exclude.cpp
@@ -81,7 +81,7 @@
}
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);
}
}