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 d658dc923fd58395e1e0062e715b9034a1337850..d10e5a3302108d6474ad6215bc3f6742fce6b7cc 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 0abbebac94608ab53bc4a2b5808b419f289030be..a5ce6dfa9b14b4b4ecefa4c4e888763e8d827d4e 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;