~unity-team/thumbnailer/devel

« back to all changes in this revision

Viewing changes to src/file_io.cpp

  • Committer: Tarmac
  • Author(s): Michi Henning
  • Date: 2017-02-07 04:03:30 UTC
  • mfrom: (365.4.12 snap)
  • Revision ID: tarmac-20170207040330-67dv5bt91rny2t1k
Adjust paths when running in a snap. Decision whether to adjust paths is now made at compile time. Also consolidated all the environment variable accesses into an EnvVar helper class.
Added home interface to service and admin tool for the time being. This allows local thumbnailing to work (but the apparmor credentials check is currently not doing the right thing).
videos don't thumbnail yet because we are not bundling the gstreamer codecs, I suspect.

Approved by James Henstridge, unity-api-1-bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
90
90
    int fd = mkstemp(&tmp_path[0]);
91
91
    if (fd == -1)
92
92
    {
93
 
        string s = string("write_file(): mkstemp() failed for " + tmp_path + ": ") + safe_strerror(errno);
 
93
        string s = string("write_file(): cannot create temp file in " + dir.native() + ": ") + safe_strerror(errno);
94
94
        throw runtime_error(s);
95
95
    }
96
96