~mfisch/brasero/update-to-3.8.0

« back to all changes in this revision

Viewing changes to src/plugins/cdrdao/burn-toc2cue.c

  • Committer: Bazaar Package Importer
  • Author(s): Pedro Fragoso
  • Date: 2008-11-18 11:30:50 UTC
  • mto: (1.4.1 experimental)
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: james.westby@ubuntu.com-20081118113050-yhrskmatlel0gzfm
Tags: upstream-0.8.3
ImportĀ upstreamĀ versionĀ 0.8.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
104
104
        
105
105
        output = fopen (toc_path, "w");
106
106
        if (!output) {
 
107
                int errsv = errno;
 
108
 
107
109
                g_io_channel_unref (source);
108
110
 
109
111
                g_free (img_path);
110
112
                g_free (toc_path);
111
113
 
112
114
                brasero_job_error (BRASERO_JOB (process),
113
 
                                   g_error_new (BRASERO_BURN_ERROR,
114
 
                                                BRASERO_BURN_ERROR_GENERAL,
115
 
                                                strerror (errno)));
 
115
                                   g_error_new_literal (BRASERO_BURN_ERROR,
 
116
                                                        BRASERO_BURN_ERROR_GENERAL,
 
117
                                                        g_strerror (errsv)));
116
118
                return BRASERO_BURN_OK;
117
119
        }
118
120
 
139
141
                }
140
142
 
141
143
                if (!fwrite (buffer, strlen (buffer), 1, output)) {
 
144
                        int errsv = errno;
 
145
 
142
146
                        g_free (buffer);
143
147
 
144
148
                        fclose (output);
150
154
                        g_free (toc_path);
151
155
 
152
156
                        brasero_job_error (BRASERO_JOB (process),
153
 
                                           g_error_new (BRASERO_BURN_ERROR,
154
 
                                                        BRASERO_BURN_ERROR_GENERAL,
155
 
                                                        strerror (errno)));
 
157
                                           g_error_new_literal (BRASERO_BURN_ERROR,
 
158
                                                                BRASERO_BURN_ERROR_GENERAL,
 
159
                                                                g_strerror (errsv)));
156
160
                        return BRASERO_BURN_OK;
157
161
                }
158
162
 
174
178
        /* the previous track image path will now be a link pointing to the
175
179
         * image path of the new track just created */
176
180
        if (g_rename (tmp_img_path, img_path)) {
 
181
                int errsv = errno;
 
182
 
177
183
                brasero_job_error (BRASERO_JOB (self),
178
 
                                   g_error_new (BRASERO_BURN_ERROR,
179
 
                                                BRASERO_BURN_ERROR_GENERAL,
180
 
                                                strerror (errno)));
 
184
                                   g_error_new_literal (BRASERO_BURN_ERROR,
 
185
                                                        BRASERO_BURN_ERROR_GENERAL,
 
186
                                                        g_strerror (errsv)));
181
187
                return BRASERO_BURN_OK;
182
188
        }
183
189
 
184
190
        if (link (img_path, tmp_img_path)) {
 
191
                int errsv = errno;
 
192
 
185
193
                brasero_job_error (BRASERO_JOB (self),
186
 
                                   g_error_new (BRASERO_BURN_ERROR,
187
 
                                                BRASERO_BURN_ERROR_GENERAL,
188
 
                                                strerror (errno)));
 
194
                                   g_error_new_literal (BRASERO_BURN_ERROR,
 
195
                                                        BRASERO_BURN_ERROR_GENERAL,
 
196
                                                        g_strerror (errsv)));
189
197
                return BRASERO_BURN_OK;
190
198
        } /* symlink () could also be used */
191
199