Correctly return WIMLIB_ERR_ICONV_NOT_AVAILABLE
authorEric Biggers <ebiggers3@gmail.com>
Wed, 19 Dec 2012 02:18:28 +0000 (20:18 -0600)
committerEric Biggers <ebiggers3@gmail.com>
Wed, 19 Dec 2012 02:18:28 +0000 (20:18 -0600)
src/add_image.c
src/ntfs-capture.c

index d658dc9..d10e5a3 100644 (file)
@@ -217,8 +217,10 @@ static int build_dentry_tree(struct dentry **root_ret,
        if (!root) {
                if (errno == EILSEQ)
                        return WIMLIB_ERR_INVALID_UTF8_STRING;
-               else
+               else if (errno == ENOMEM)
                        return WIMLIB_ERR_NOMEM;
+               else
+                       return WIMLIB_ERR_ICONV_NOT_AVAILABLE;
        }
 
        inode = root->d_inode;
index 0abbeba..a5ce6df 100644 (file)
@@ -556,8 +556,10 @@ static int build_dentry_tree_ntfs_recursive(struct dentry **root_p,
        if (!root) {
                if (errno == EILSEQ)
                        return WIMLIB_ERR_INVALID_UTF8_STRING;
-               else
+               else if (errno == ENOMEM)
                        return WIMLIB_ERR_NOMEM;
+               else
+                       return WIMLIB_ERR_ICONV_NOT_AVAILABLE;
        }
        *root_p = root;