]> wimlib.net Git - wimlib/blobdiff - src/inode_fixup.c
Limit can_modify_wim() calls; remove can_delete_from_wim()
[wimlib] / src / inode_fixup.c
index 88a6b8e35c5f5fbc97ded879b3a1358ffbc423fb..da74c77fc4bc584ce1feace616834258480d9fb5 100644 (file)
@@ -5,20 +5,18 @@
 /*
  * Copyright (C) 2012, 2013, 2014 Eric Biggers
  *
- * This file is part of wimlib, a library for working with WIM files.
+ * This file is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 3 of the License, or (at your option) any
+ * later version.
  *
- * wimlib is free software; you can redistribute it and/or modify it under the
- * terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 3 of the License, or (at your option)
- * any later version.
- *
- * wimlib is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
- * A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * This file is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
  * details.
  *
- * You should have received a copy of the GNU General Public License
- * along with wimlib; if not, see http://www.gnu.org/licenses/.
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this file; if not, see http://www.gnu.org/licenses/.
  */
 
 #ifdef HAVE_CONFIG_H
@@ -85,7 +83,9 @@ inode_table_insert(struct wim_dentry *dentry, void *_params)
                        params->num_inconsistent_inodes++;
                        continue;
                }
-               if (unlikely(d_inode->i_attributes & FILE_ATTRIBUTE_DIRECTORY)) {
+               if (unlikely((d_inode->i_attributes & FILE_ATTRIBUTE_DIRECTORY) ||
+                            (inode->i_attributes & FILE_ATTRIBUTE_DIRECTORY)))
+               {
                        params->num_dir_hard_links++;
                        if (params->num_dir_hard_links <=
                            MAX_DIR_HARD_LINK_WARNINGS)