librazor/atomic-ktm.c
changeset 466 bad1547191dc
parent 441 cf499fd51df7
child 475 008c75a5e08d
     1.1 --- a/librazor/atomic-ktm.c	Sat Aug 23 16:07:09 2014 +0100
     1.2 +++ b/librazor/atomic-ktm.c	Thu Apr 14 11:59:56 2016 +0100
     1.3 @@ -214,7 +214,9 @@
     1.4  				}
     1.5  			} else if (!(fa.dwFileAttributes&
     1.6  				     FILE_ATTRIBUTE_DIRECTORY)) {
     1.7 -				razor_set_error2(&atomic->error, buffer->str,
     1.8 +				razor_set_error2(&atomic->error,
     1.9 +						 RAZOR_MSWIN_ERROR,
    1.10 +						 ERROR_DIRECTORY, buffer->str,
    1.11  						 "Not a directory");
    1.12  				razor_wstr_destroy(buffer);
    1.13  				return -1;
    1.14 @@ -378,8 +380,8 @@
    1.15  	 * and we don't always know that at the time when the
    1.16  	 * link is created, so it's a convienent lie for now.
    1.17  	 */
    1.18 -	razor_set_error(&atomic->error, NULL,
    1.19 -			"Symbolic links not supported on this platform");
    1.20 +	razor_set_error(&atomic->error, RAZOR_MSWIN_ERROR, ERROR_NOT_SUPPORTED,
    1.21 +			NULL, "Symbolic links not supported on this platform");
    1.22  
    1.23  	return -1;
    1.24  }
    1.25 @@ -398,7 +400,8 @@
    1.26  	files = realloc(atomic->files,
    1.27  			(atomic->n_files+1) * sizeof(struct razor_atomic_file));
    1.28  	if (!files) {
    1.29 -		razor_set_error(&atomic->error, NULL, "Not enough memory");
    1.30 +		razor_set_error(&atomic->error, RAZOR_POSIX_ERROR, ENOMEM, NULL,
    1.31 +				"Not enough memory");
    1.32  		return -1;
    1.33  	}
    1.34  	atomic->n_files++;