- /* The absolute path to the WIM is requested so that wimlib_overwrite()
- * still works even if the process changes its working directory. This
- * actually happens if a WIM is mounted read-write, since the FUSE
- * thread changes directory to "/", and it needs to be able to find the
- * WIM file again.
- *
- * This will break if the full path to the WIM changes in the
- * intervening time...
- *
- * Warning: in Windows native builds, realpath() calls the replacement
- * function in win32.c.
- */
- w->filename = realpath(in_wim_path, NULL);
- if (!w->filename) {
- ERROR_WITH_ERRNO("Failed to resolve WIM filename");
- if (errno == ENOMEM)
- return WIMLIB_ERR_NOMEM;
- else
- return WIMLIB_ERR_OPEN;
+ /* The absolute path to the WIM is requested so that
+ * wimlib_overwrite() still works even if the process changes
+ * its working directory. This actually happens if a WIM is
+ * mounted read-write, since the FUSE thread changes directory
+ * to "/", and it needs to be able to find the WIM file again.
+ *
+ * This will break if the full path to the WIM changes in the
+ * intervening time...
+ *
+ * Warning: in Windows native builds, realpath() calls the
+ * replacement function in win32.c.
+ */
+ wim->filename = realpath(wimfile, NULL);
+ if (!wim->filename) {
+ ERROR_WITH_ERRNO("Failed to resolve WIM filename");
+ if (errno == ENOMEM)
+ return WIMLIB_ERR_NOMEM;
+ else
+ return WIMLIB_ERR_OPEN;
+ }