Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-04-06 10:03:48 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-04-06 10:03:48 +0400
commita7507e945d1c314b9bf7f8298a8beea58e047d37 (patch)
treeae5ae0422e5eea00d1b2ae032ebcddaaf6058583 /source/blender/windowmanager
parent5c7bed92d4a124a92c596f2dbe212cc59335925f (diff)
fix [#26803] Libs paths are case sensitive in windows
use case insensitive path comparison on windows: BLI_path_cmp
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/intern/wm_files.c6
-rw-r--r--source/blender/windowmanager/intern/wm_keymap.c2
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c6
3 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index 35bb874ff71..51a04b28a12 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -510,7 +510,7 @@ static void write_history(void)
recent = G.recent_files.first;
/* refresh recent-files.txt of recent opened files, when current file was changed */
- if(!(recent) || (strcmp(recent->filepath, G.main->name)!=0)) {
+ if(!(recent) || (BLI_path_cmp(recent->filepath, G.main->name)!=0)) {
fp= fopen(name, "w");
if (fp) {
/* add current file to the beginning of list */
@@ -524,7 +524,7 @@ static void write_history(void)
/* write rest of recent opened files to recent-files.txt */
while((i<U.recent_files) && (recent)){
/* this prevents to have duplicities in list */
- if (strcmp(recent->filepath, G.main->name)!=0) {
+ if (BLI_path_cmp(recent->filepath, G.main->name)!=0) {
fprintf(fp, "%s\n", recent->filepath);
recent = recent->next;
}
@@ -656,7 +656,7 @@ int WM_write_file(bContext *C, const char *target, int fileflags, ReportList *re
/* send the OnSave event */
for (li= G.main->library.first; li; li= li->id.next) {
- if (strcmp(li->filepath, di) == 0) {
+ if (BLI_path_cmp(li->filepath, di) == 0) {
BKE_reportf(reports, RPT_ERROR, "Can't overwrite used library '%.200s'", di);
return -1;
}
diff --git a/source/blender/windowmanager/intern/wm_keymap.c b/source/blender/windowmanager/intern/wm_keymap.c
index 57b84fc18f4..336acd9f9bf 100644
--- a/source/blender/windowmanager/intern/wm_keymap.c
+++ b/source/blender/windowmanager/intern/wm_keymap.c
@@ -104,7 +104,7 @@ wmKeyConfig *WM_keyconfig_new_user(wmWindowManager *wm, const char *idname)
void WM_keyconfig_remove(wmWindowManager *wm, wmKeyConfig *keyconf)
{
if (keyconf) {
- if (BLI_streq(U.keyconfigstr, keyconf->idname)) {
+ if (strncmp(U.keyconfigstr, keyconf->idname, sizeof(U.keyconfigstr)) == 0) {
BLI_strncpy(U.keyconfigstr, wm->defaultconf->idname, sizeof(U.keyconfigstr));
}
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index 093899954ff..4350b0505c9 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -1133,8 +1133,8 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *UNUSED(ar
sprintf(revision_str, "r%s", build_rev);
BLF_size(style->widgetlabel.uifont_id, style->widgetlabel.points, U.dpi);
- ver_width = BLF_width(style->widgetlabel.uifont_id, version_str)+5;
- rev_width = BLF_width(style->widgetlabel.uifont_id, revision_str)+5;
+ ver_width = (int)BLF_width(style->widgetlabel.uifont_id, version_str) + 5;
+ rev_width = (int)BLF_width(style->widgetlabel.uifont_id, revision_str) + 5;
#endif //NAN_BUILDINFO
block= uiBeginBlock(C, ar, "_popup", UI_EMBOSS);
@@ -1522,7 +1522,7 @@ static int wm_link_append_exec(bContext *C, wmOperator *op)
BKE_report(op->reports, RPT_ERROR, "Nothing indicated");
return OPERATOR_CANCELLED;
}
- else if(BLI_streq(bmain->name, libname)) {
+ else if(BLI_path_cmp(bmain->name, libname) == 0) {
BKE_report(op->reports, RPT_ERROR, "Cannot use current file as library");
return OPERATOR_CANCELLED;
}