diff -r cf499fd51df7 -r 7a38fc77fbde librazor/atomic-ktm.c --- a/librazor/atomic-ktm.c Sat Aug 23 16:07:09 2014 +0100 +++ b/librazor/atomic-ktm.c Wed Jun 08 15:15:27 2016 +0100 @@ -214,7 +214,9 @@ } } else if (!(fa.dwFileAttributes& FILE_ATTRIBUTE_DIRECTORY)) { - razor_set_error2(&atomic->error, buffer->str, + razor_set_error2(&atomic->error, + RAZOR_MSWIN_ERROR, + ERROR_DIRECTORY, buffer->str, "Not a directory"); razor_wstr_destroy(buffer); return -1; @@ -378,8 +380,8 @@ * and we don't always know that at the time when the * link is created, so it's a convienent lie for now. */ - razor_set_error(&atomic->error, NULL, - "Symbolic links not supported on this platform"); + razor_set_error(&atomic->error, RAZOR_MSWIN_ERROR, ERROR_NOT_SUPPORTED, + NULL, "Symbolic links not supported on this platform"); return -1; } @@ -398,7 +400,8 @@ files = realloc(atomic->files, (atomic->n_files+1) * sizeof(struct razor_atomic_file)); if (!files) { - razor_set_error(&atomic->error, NULL, "Not enough memory"); + razor_set_error(&atomic->error, RAZOR_POSIX_ERROR, ENOMEM, NULL, + "Not enough memory"); return -1; } atomic->n_files++;