diff -r d0aa9e0a6d04 -r 2d8fecb8f024 librazor/atomic-actions.c --- a/librazor/atomic-actions.c Thu Feb 09 20:42:08 2012 +0000 +++ b/librazor/atomic-actions.c Fri Mar 23 20:24:09 2012 +0000 @@ -259,9 +259,9 @@ return 0; if (errno != EEXIST || chmod(action->args.path, mode) < 0) { - if (!atomic->error_str) - razor_atomic_set_error_str(atomic, action->args.path, - strerror(errno)); + if (!atomic->error) + atomic->error = razor_error_new_str(action->args.path, + strerror(errno)); atomic_action_free(action); return NULL; } @@ -278,9 +278,9 @@ } if (rmdir(action->args.path) < 0) { - if (!atomic->error_str) - razor_atomic_set_error_str(atomic, action->args.path, - strerror(errno)); + if (!atomic->error) + atomic->error = razor_error_new_str(action->args.path, + strerror(errno)); atomic_action_free(action); return NULL; } else @@ -301,9 +301,9 @@ r = symlink(action->args.u.create_symlink.target, action->args.path); if (r < 0) { - if (!atomic->error_str) - razor_atomic_set_error_str(atomic, NULL, - strerror(errno)); + if (!atomic->error) + atomic->error = razor_error_new_str(action->args.path, + strerror(errno)); atomic_action_free(action); return NULL; } @@ -321,9 +321,9 @@ } if (unlink(action->args.path) < 0) { - if (!atomic->error_str) - razor_atomic_set_error_str(atomic, NULL, - strerror(errno)); + if (!atomic->error) + atomic->error = razor_error_new_str(action->args.path, + strerror(errno)); atomic_action_free(action); return NULL; } @@ -351,9 +351,9 @@ (void)RemoveDirectoryW(newbuf); if (!MoveFileExW(oldbuf, newbuf, flags)) { - if (!atomic->error_str) - razor_atomic_set_error_mswin(atomic, newbuf, - GetLastError()); + if (!atomic->error) + atomic->error = razor_error_new_mswin(newbuf, + GetLastError()); return -1; } @@ -361,9 +361,9 @@ free(oldbuf); #else if (rename(path, dest)) { - if (!atomic->error_str) - razor_atomic_set_error_str(atomic, dest, - strerror(errno)); + if (!atomic->error) + atomic->error = razor_error_new_str(dest, + strerror(errno)); return -1; } #endif