- /* Decide whether to create a directory or not. If not a
- * directory, also decide on the inode number (i.e. we may
- * generate a "hard link" to an existing file). */
- is_directory = ((rand32() % 16) <= 6);
- if (is_directory)
+ /*
+ * Select an inode number for the new file. Sometimes choose an
+ * existing inode number (i.e. create a hard link). However,
+ * wimlib intentionally doesn't honor directory hard links, and
+ * reparse points cannot be represented in the WIM file format
+ * at all; so don't create hard links for such files.
+ */
+ if (is_directory || is_reparse)