~ubuntu-branches/ubuntu/saucy/darktable/saucy

« back to all changes in this revision

Viewing changes to src/imageio/storage/email.c

  • Committer: Bazaar Package Importer
  • Author(s): David Bremner
  • Date: 2011-07-12 09:36:46 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20110712093646-yp9dbxan44dmw15h
Tags: 0.9-1
* New upstream release.
* Remove all patches now upstream; only patch for
  -Wno-error=unused-but-set-variable remains.
* Bump Standards-Version to 3.9.2 (no changes)

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
#include "dtgtk/paint.h"
29
29
#include <stdio.h>
30
30
#include <stdlib.h>
31
 
#include <glade/glade.h>
32
31
 
33
32
DT_MODULE(1)
34
33
 
92
91
  /* construct a temporary file name */
93
92
  char tmpdir[4096]= {0};
94
93
  dt_get_user_local_dir (tmpdir,4096);
95
 
  strcat (tmpdir,"/tmp");
 
94
  g_strlcat (tmpdir,"/tmp",4096);
96
95
  g_mkdir_with_parents(tmpdir,0700);
97
96
 
98
97
  char dirname[4096];
99
98
  dt_image_full_path(img->id, dirname, 1024);
100
99
  const gchar * filename = g_basename( dirname );
101
 
  strcpy( g_strrstr( filename,".")+1, format->extension(fdata));
 
100
  gchar * end = g_strrstr( filename,".")+1;
 
101
  g_strlcpy( end, format->extension(fdata), sizeof(dirname)-(end-dirname));
102
102
 
103
103
  attachment->file = g_build_filename( tmpdir, filename, (char *)NULL );
104
104
 
110
110
  dt_control_log(_("%d/%d exported to `%s%s'"), num, total, trunc != filename ? ".." : "", trunc);
111
111
 
112
112
#ifdef _OPENMP // store can be called in parallel, so synch access to shared memory
113
 
#pragma omp critical
 
113
  #pragma omp critical
114
114
#endif
115
115
  d->images = g_list_append( d->images, attachment );
116
116
 
231
231
 
232
232
  return 1;
233
233
}
 
234
 
 
235
// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-space on;