X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=src%2Fsplit.c;fp=src%2Fsplit.c;h=1313a59aa10ef03c36101ed99508db9206fc2034;hp=795fb2cf4f269b7a6b3de6fb73613a749ffc959b;hb=06be73db2299bf580cfc4197099bce8547472825;hpb=4a2178bacbcf88a4f0c504967d68181c2a86da5b diff --git a/src/split.c b/src/split.c index 795fb2cf..1313a59a 100644 --- a/src/split.c +++ b/src/split.c @@ -31,6 +31,7 @@ #include "wimlib/error.h" #include "wimlib/list.h" #include "wimlib/metadata.h" +#include "wimlib/paths.h" #include "wimlib/progress.h" #include "wimlib/resource.h" #include "wimlib/wim.h" @@ -74,7 +75,7 @@ write_split_wim(WIMStruct *orig_wim, const tchar *swm_name, swm_name_len = tstrlen(swm_name); swm_name_buf = alloca((swm_name_len + 20) * sizeof(tchar)); tstrcpy(swm_name_buf, swm_name); - dot = tstrchr(swm_name_buf, T('.')); + dot = tstrrchr(path_basename(swm_name_buf), T('.')); if (dot) { swm_base_name_len = dot - swm_name_buf; swm_suffix = alloca((tstrlen(dot) + 1) * sizeof(tchar));