// Store the path
archive_entry_set_pathname(file->entry, buffer);
- // Make the absolute path
- r = pakfire_path(file->pakfire, buffer, "%s", buffer);
- if (r < 0)
- return r;
+ // Store the absolute path only when not in stub mode
+ if (!pakfire_has_flag(file->pakfire, PAKFIRE_FLAGS_STUB)) {
+ // Make the absolute path
+ r = pakfire_path(file->pakfire, buffer, "%s", buffer);
+ if (r < 0)
+ return r;
- // Store the abspath
- archive_entry_copy_sourcepath(file->entry, buffer);
+ // Store the abspath
+ archive_entry_copy_sourcepath(file->entry, buffer);
+ }
return 0;
}