diff options
| author | Jiri Moskovcak <jmoskovc@redhat.com> | 2010-03-09 11:24:58 +0100 |
|---|---|---|
| committer | Jiri Moskovcak <jmoskovc@redhat.com> | 2010-03-09 11:24:58 +0100 |
| commit | fc8eb70f3446578a4dd632ede5c1347c0b3ece5b (patch) | |
| tree | fea5827ab0b7940353f03c9d7b6ef243129b2366 /src | |
| parent | e74c5cb7835d2e6e3ddbeee69023995304d08264 (diff) | |
| parent | e0c611c9c5d01fad34efe7166bc6696cf478f6f1 (diff) | |
| download | abrt-fc8eb70f3446578a4dd632ede5c1347c0b3ece5b.tar.gz abrt-fc8eb70f3446578a4dd632ede5c1347c0b3ece5b.tar.xz abrt-fc8eb70f3446578a4dd632ede5c1347c0b3ece5b.zip | |
Merge branch 'master' of ssh://git.fedorahosted.org/git/abrt
Diffstat (limited to 'src')
| -rw-r--r-- | src/Daemon/MiddleWare.cpp | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/src/Daemon/MiddleWare.cpp b/src/Daemon/MiddleWare.cpp index 4a8c7cf..3ab3ddd 100644 --- a/src/Daemon/MiddleWare.cpp +++ b/src/Daemon/MiddleWare.cpp @@ -129,16 +129,22 @@ static void load_crash_data_from_debug_dump(CDebugDump& dd, map_crash_data_t& da while (dd.GetNextFile(&short_name, &full_name)) { ssize_t sz = 4*1024; - char *text = is_text_file(full_name.c_str(), &sz); - if (!text) + char *text = NULL; + bool editable = is_editable_file(short_name.c_str()); + + if (!editable) { - add_to_crash_data_ext(data, - short_name.c_str(), - CD_BIN, - CD_ISNOTEDITABLE, - full_name.c_str() - ); - continue; + text = is_text_file(full_name.c_str(), &sz); + if (!text) + { + add_to_crash_data_ext(data, + short_name.c_str(), + CD_BIN, + CD_ISNOTEDITABLE, + full_name.c_str() + ); + continue; + } } std::string content; @@ -151,7 +157,7 @@ static void load_crash_data_from_debug_dump(CDebugDump& dd, map_crash_data_t& da add_to_crash_data_ext(data, short_name.c_str(), CD_TXT, - is_editable_file(short_name.c_str()) ? CD_ISEDITABLE : CD_ISNOTEDITABLE, + editable ? CD_ISEDITABLE : CD_ISNOTEDITABLE, content.c_str() ); } |
