X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Ffs%2Funix%2Fstat.cpp;h=1ba62cd1c3f8a752032c6f1a1baca95ce9a28051;hp=1404fede5c030b462fa410c38adb9de0dd0cb568;hb=211c503e709ffa8bec7b71b8004ecdeadf776c4c;hpb=e9606fcfd202207a029fff31f03b8e1a7a0d2963 diff --git a/source/fs/unix/stat.cpp b/source/fs/unix/stat.cpp index 1404fed..1ba62cd 100644 --- a/source/fs/unix/stat.cpp +++ b/source/fs/unix/stat.cpp @@ -2,10 +2,7 @@ #include #include #include -#include -#include #include -#include #include "stat.h" #include "stat_private.h" @@ -43,25 +40,6 @@ Stat Stat::Private::from_struct_stat(const struct stat &st) return result; } -void Stat::Private::fill_owner_info(Stat::OwnerInfo &result) -{ - char buf[1024]; - - struct passwd pw; - struct passwd *owner; - if(!getpwuid_r(owner_id, &pw, buf, sizeof(buf), &owner) && owner) - result.owner = owner->pw_name; - else - result.owner = format("%d", owner_id); - - struct group gr; - struct group *group; - if(!getgrgid_r(group_id, &gr, buf, sizeof(buf), &group) && group) - result.group = group->gr_name; - else - result.group = format("%d", group_id); -} - Stat Stat::stat(const Path &path) {