Fix DPX/CINEON writing full file paths into image headers on WIN32
Use back-slashes to find the file-name component on windows.
This commit is contained in:
parent
5c9ab3e003
commit
48c4c409b8
|
@ -393,7 +393,7 @@ LogImageFile *cineonCreate(
|
|||
cineon->referenceBlack = 95.0f;
|
||||
cineon->gamma = 1.7f;
|
||||
|
||||
shortFilename = strrchr(filepath, '/');
|
||||
shortFilename = strrchr(filepath, PATHSEP_CHAR);
|
||||
if (shortFilename == NULL) {
|
||||
shortFilename = filepath;
|
||||
}
|
||||
|
|
|
@ -502,7 +502,7 @@ LogImageFile *dpxCreate(const char *filepath,
|
|||
dpx->gamma = 1.7f;
|
||||
}
|
||||
|
||||
shortFilename = strrchr(filepath, '/');
|
||||
shortFilename = strrchr(filepath, PATHSEP_CHAR);
|
||||
if (shortFilename == NULL) {
|
||||
shortFilename = filepath;
|
||||
}
|
||||
|
|
|
@ -19,6 +19,12 @@
|
|||
#include "BLI_sys_types.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
# define PATHSEP_CHAR '\\'
|
||||
#else
|
||||
# define PATHSEP_CHAR '/'
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue