Commit f3af8f60 authored by Oleg.Korshul's avatar Oleg.Korshul Committed by Alexander Trofimov

XFS file system

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@65889 954022d7-b5bf-4e40-9824-e11837661b57
parent 4aa93ca9
......@@ -115,6 +115,8 @@ namespace FileSystem {
pcRes[a_str.length()] = '\0';
int res = mkstemp( pcRes);
if (-1 != res)
close(res);
std::string sRes = pcRes;
return stringUtf8ToWString (sRes);
......@@ -133,6 +135,8 @@ namespace FileSystem {
pcRes[a_str.length()] = '\0';
int res = mkstemp( pcRes);
if (-1 != res)
close(res);
std::string sRes = pcRes;
return stringUtf8ToWString (sRes);
......@@ -191,8 +195,20 @@ namespace FileSystem {
if(strncmp(entry->d_name, "..", 2) != 0 &&
strncmp(entry->d_name, ".", 1) != 0)
{
bool bIsDir = false;
if (DT_DIR == entry->d_type)
bIsDir = true;
else if (DT_UNKNOWN == entry->d_type)
{
// XFS problem
struct stat buff;
std::string sTmp = std::string((char*)dirname) + "/" + std::string(entry->d_name);
stat(sTmp.c_str(), &buff);
if (S_ISDIR(buff.st_mode))
bIsDir = true;
}
// If it's a directory recurse into it
if (entry->d_type == DT_DIR)
if (bIsDir)
{
if (recursive)
{
......
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