| … | |
… | |
| 48 | { |
48 | { |
| 49 | if (NULL != getenv(ENV_PORTAGE_TMPDIR)) { |
49 | if (NULL != getenv(ENV_PORTAGE_TMPDIR)) { |
| 50 | /* Portage handle setting SANDBOX_WRITE itself. */ |
50 | /* Portage handle setting SANDBOX_WRITE itself. */ |
| 51 | sandbox_info->work_dir[0] = '\0'; |
51 | sandbox_info->work_dir[0] = '\0'; |
| 52 | } else { |
52 | } else { |
| 53 | if (NULL == egetcwd(sandbox_info->work_dir, SB_PATH_MAX)) { |
53 | if (NULL == getcwd(sandbox_info->work_dir, SB_PATH_MAX)) { |
| 54 | perror("sandbox: Failed to get current directory"); |
54 | perror("sandbox: Failed to get current directory"); |
| 55 | return -1; |
55 | return -1; |
| 56 | } |
56 | } |
| 57 | } |
57 | } |
| 58 | |
58 | |