1 // Copyright (c) 2013 Intel Corporation. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "download/download_instance.h"
12 std::string DownloadInstance::GetFullDestinationPath(
13 const std::string destination) const {
14 std::string path(getenv("HOME"));
16 struct passwd password_entry;
17 struct passwd* password_entry_ptr;
19 if (!getpwuid_r(getuid(), &password_entry,
20 buf, sizeof buf, &password_entry_ptr)) {
21 path = password_entry.pw_dir;
24 return (path + '/' + destination);