patch [#34103] path_util_split_dirstring.patch, path_util_split_dirstring_2.patch...
[blender.git] / source / blender / editors / space_image / image_ops.c
index 55f632412ee793b5a3f6ee56abeaa8f06cee17a5..46acd2519c21dcdf4093f37696eae260ba592f29 100644 (file)
@@ -1603,7 +1603,7 @@ static int image_save_sequence_exec(bContext *C, wmOperator *op)
        SpaceImage *sima = CTX_wm_space_image(C);
        ImBuf *ibuf;
        int tot = 0;
-       char di[FILE_MAX], fi[FILE_MAX];
+       char di[FILE_MAX];
        
        if (sima->image == NULL)
                return OPERATOR_CANCELLED;
@@ -1632,10 +1632,8 @@ static int image_save_sequence_exec(bContext *C, wmOperator *op)
        for (ibuf = sima->image->ibufs.first; ibuf; ibuf = ibuf->next)
                if (ibuf->userflags & IB_BITMAPDIRTY)
                        break;
-       
-       BLI_strncpy(di, ibuf->name, FILE_MAX);
-       BLI_splitdirstring(di, fi);
-       
+
+       BLI_split_dir_part(ibuf->name, di, sizeof(di));
        BKE_reportf(op->reports, RPT_INFO, "%d image(s) will be saved in %s", tot, di);
 
        for (ibuf = sima->image->ibufs.first; ibuf; ibuf = ibuf->next) {