~ubuntu-branches/ubuntu/gutsy/avscan/gutsy

« back to all changes in this revision

Viewing changes to avscan/winresultsfio.c

  • Committer: Bazaar Package Importer
  • Author(s): Christoph Berg
  • Date: 2007-08-12 14:22:25 UTC
  • mfrom: (1.9.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20070812142225-2whp6690lilo2wg8
Tags: 3.2.1-openssl-2
Correctly handle DEB_BUILD_OPTIONS=nostrip (Closes: #436496).

Show diffs side-by-side

added added

removed removed

Lines of Context:
101
101
        if(fp == NULL)
102
102
        {
103
103
            const gint error_code = (gint)errno;
104
 
            gchar *s, *error_msg = STRDUP(g_strerror(error_code));
105
 
            if(error_msg != NULL)
106
 
            {
107
 
                *error_msg = (gchar)toupper((char)*error_msg);
108
 
                s = g_strdup_printf(
109
 
                    "%s:\n\n    %s",
110
 
                    error_msg,
111
 
                    path
112
 
                );
 
104
            gchar *msg = g_strdup_printf(
 
105
                "%s:\n\n    %s",
 
106
                g_strerror(error_code),
 
107
                path
 
108
            );
113
109
#ifdef HAVE_EDV2
114
 
                EDVPlaySoundWarning(core->edv_ctx);
 
110
            EDVPlaySoundWarning(core->edv_ctx);
115
111
#endif
116
 
                CDialogSetTransientFor(toplevel);
117
 
                CDialogGetResponse(
118
 
                    "Open Results Log Failed",
119
 
                    s,
120
 
                    NULL,   
121
 
                    CDIALOG_ICON_WARNING,
122
 
                    CDIALOG_BTNFLAG_OK,
123
 
                    CDIALOG_BTNFLAG_OK
124
 
                );
125
 
                CDialogSetTransientFor(NULL);
126
 
                g_free(s);
127
 
                g_free(error_msg);
128
 
            }
 
112
            CDialogSetTransientFor(toplevel);
 
113
            CDialogGetResponse(
 
114
                "Open Results Log Failed",
 
115
                msg,
 
116
                NULL,   
 
117
                CDIALOG_ICON_WARNING,
 
118
                CDIALOG_BTNFLAG_OK,
 
119
                CDIALOG_BTNFLAG_OK
 
120
            );
 
121
            CDialogSetTransientFor(NULL);
 
122
            g_free(msg);
129
123
            return;
130
124
        }
131
125
 
459
453
        core = win->core;
460
454
        scan_ctx = win->scan_context;
461
455
 
462
 
        if(stat(path, &stat_buf))
 
456
        if(stat((const char *)path, &stat_buf))
463
457
        {
464
458
            const gint error_code = (gint)errno;
465
459
#ifdef ENOENT
481
475
        if(fp == NULL)
482
476
        {
483
477
            const gint error_code = (gint)errno;
484
 
            gchar *s, *error_msg = STRDUP(g_strerror(error_code));
485
 
            if(error_msg != NULL)
486
 
            {
487
 
                *error_msg = (gchar)toupper((char)*error_msg);
488
 
                s = g_strdup_printf(
489
 
                    "%s:\n\n    %s",
490
 
                    error_msg,
491
 
                    path
492
 
                );
 
478
            gchar *msg = g_strdup_printf(
 
479
                "%s:\n\n    %s",
 
480
                g_strerror(error_code),
 
481
                path
 
482
            );
493
483
#ifdef HAVE_EDV2
494
 
                EDVPlaySoundWarning(core->edv_ctx);
 
484
            EDVPlaySoundWarning(core->edv_ctx);
495
485
#endif
496
 
                CDialogSetTransientFor(toplevel);
497
 
                CDialogGetResponse(
498
 
                    "Save Results Log Failed",
499
 
                    s,
500
 
                    NULL,   
501
 
                    CDIALOG_ICON_WARNING,
502
 
                    CDIALOG_BTNFLAG_OK,
503
 
                    CDIALOG_BTNFLAG_OK
504
 
                );
505
 
                CDialogSetTransientFor(NULL);
506
 
                g_free(s);
507
 
                g_free(error_msg);
508
 
            }
 
486
            CDialogSetTransientFor(toplevel);
 
487
            CDialogGetResponse(
 
488
                "Save Results Log Failed",
 
489
                msg,
 
490
                NULL,   
 
491
                CDIALOG_ICON_WARNING,
 
492
                CDIALOG_BTNFLAG_OK,
 
493
                CDIALOG_BTNFLAG_OK
 
494
            );
 
495
            CDialogSetTransientFor(NULL);
 
496
            g_free(msg);
509
497
            return;
510
498
        }
511
499