~dobey/unity-api/add-simple-logger

« back to all changes in this revision

Viewing changes to src/unity/util/SnapPath.cpp

  • Committer: Rodney Dawes
  • Date: 2017-03-28 18:46:21 UTC
  • Revision ID: rodney.dawes@canonical.com-20170328184621-18csdpvy33yfkrfu
Fixes per review.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
 
26
26
std::string prepend_snap_path(const std::string& path)
27
27
{
28
 
    auto get_snap_path = []() {
29
 
        const char* env_snap = getenv("SNAP");
30
 
        if (env_snap == nullptr) {
31
 
            return "";
32
 
        }
33
 
        return env_snap;
34
 
    };
35
 
    return get_snap_path() + path;
 
28
    const char* env_snap = getenv("SNAP");
 
29
    if (env_snap == nullptr) {
 
30
        return path;
 
31
    }
 
32
    return env_snap + path;
36
33
}
37
34
 
38
35
} // namespace util