Merge branch 'jc/mkstemp-more-careful-error-reporting'

After failing to create a temporary file using mkstemp(), failing
pathname was not reported correctly on some platforms.

* jc/mkstemp-more-careful-error-reporting:
  xmkstemp(): avoid showing truncated template more carefully
This commit is contained in:
Junio C Hamano 2013-01-02 10:38:25 -08:00
Родитель 3fce9a1edd f7be59b477
Коммит 9316f910f7
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -229,7 +229,7 @@ int xmkstemp(char *template)
int saved_errno = errno;
const char *nonrelative_template;
if (!template[0])
if (strlen(template) != strlen(origtemplate))
template = origtemplate;
nonrelative_template = absolute_path(template);