summaryrefslogtreecommitdiffstats
path: root/lib/Plugins/FileTransfer.cpp
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-09-30 15:15:08 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2009-09-30 15:15:08 +0200
commit5632ddb849821bf8c4fac9f4aa8c4779575eef97 (patch)
treec0f5cdeabec71de882f7d6dcbfffc0daeb0c961a /lib/Plugins/FileTransfer.cpp
parent0a901ba3e651a70984e980f61619b005031a71f0 (diff)
downloadabrt-5632ddb849821bf8c4fac9f4aa8c4779575eef97.tar.gz
abrt-5632ddb849821bf8c4fac9f4aa8c4779575eef97.tar.xz
abrt-5632ddb849821bf8c4fac9f4aa8c4779575eef97.zip
fix all instances of dent->d_type == DT_REG checks
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'lib/Plugins/FileTransfer.cpp')
-rw-r--r--lib/Plugins/FileTransfer.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/Plugins/FileTransfer.cpp b/lib/Plugins/FileTransfer.cpp
index 08d915d..9c2f3c5 100644
--- a/lib/Plugins/FileTransfer.cpp
+++ b/lib/Plugins/FileTransfer.cpp
@@ -137,13 +137,12 @@ static void traverse_directory(const char * directory, void * something,
dp = opendir(directory);
while ((dirp = readdir(dp)) != NULL)
{
- if (dirp->d_type == DT_REG)
+ if (is_regular_file(dirp, directory))
{
- complete_name[0] = '\0';
end = stpcpy(complete_name, directory);
if (end[-1] != '/')
{
- end = stpcpy(end, "/");
+ *end++ = '/';
}
end = stpcpy(end, dirp->d_name);
@@ -292,7 +291,8 @@ void CFileTransfer::Run(const std::string& pActiveDir, const std::string& pArgs)
dirlist.open(FILETRANSFER_DIRLIST, fstream::out | fstream::app );
dirlist << pActiveDir << endl;
dirlist.close();
- } else if(pArgs == "one")
+ }
+ else if (pArgs == "one")
{
/* just send one archive */
gethostname(hostname,HBLEN);
@@ -312,7 +312,6 @@ void CFileTransfer::Run(const std::string& pActiveDir, const std::string& pArgs)
}
else
{
-
gethostname(hostname,HBLEN);
dirlist.open(FILETRANSFER_DIRLIST, fstream::in);