ALT Linux Bugzilla
– Attachment 1058 Details for
Bug 7672
madman не находит файлы
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
исправленный патч
madmad-0.93-gns-scanfix2.patch (text/plain), 1.36 KB, created by
Nick S. Grechukh
on 2005-08-17 19:05:16 MSD
(
hide
)
Description:
исправленный патч
Filename:
MIME Type:
Creator:
Nick S. Grechukh
Created:
2005-08-17 19:05:16 MSD
Size:
1.36 KB
patch
obsolete
>--- base.cpp 2005-08-17 17:47:49 +0300 >+++ base.cpp.new 2005-08-17 17:58:45 +0300 >@@ -25,6 +25,7 @@ > #include <qregexp.h> > #include <stdexcept> > #include <dirent.h> >+#include <sys/stat.h> > #include "utility/progress.h" > > >@@ -304,12 +305,12 @@ > else > realdir = directory; > >- try >- { > dir = opendir(realdir.c_str()); > if (dir == NULL) > throw runtime_error(("could not open directory: "+directory).c_str()); > >+ try >+ { > while ((entry = readdir(dir))) > { > if (strcmp(entry->d_name, ".") == 0) >@@ -318,16 +319,28 @@ > continue; > if (prog) > prog->setProgress(prog->progress() + 1); >- if (entry->d_type == DT_DIR) >- enumerateFiles(realdir + "/" + entry->d_name, result, prog); >- else if (entry->d_type == DT_REG) >- result.push_back(realdir + "/" + entry->d_name); >+ string full_name = realdir + "/" + entry->d_name; >+ >+ struct stat my_statbuf; >+ if (stat(full_name.c_str(), &my_statbuf) != 0) >+ { >+ cerr >+ << "*** Failed to stat:" << endl >+ << "*** " << full_name << endl; >+ continue; >+ } >+ >+ if (S_ISDIR(my_statbuf.st_mode)) >+ enumerateFiles(full_name, result, prog); >+ else if (S_ISREG(my_statbuf.st_mode)) >+ result.push_back(full_name); > } > closedir(dir); > } > catch (...) > { > closedir(dir); >+ throw; > } > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 7672
:
1057
| 1058 |
1061