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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2013-06-25 18:48:30 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2013-06-25 18:48:30 +0400
commit40d4dfaba84fe0d5048cc847d5d249a35314b8ed (patch)
tree89346ba302d9d00b857b23b13b84e14cd8c6ba99 /source/blender
parent689ca4aef7228f910065d45e0648e802c17ab7c2 (diff)
Fix #35824: finding missing files not working correct for filepaths with special
characters on Windows. Replaced some uses of stat() by BLI_stat() to properly handle such filepaths.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenkernel/intern/bpath.c2
-rw-r--r--source/blender/blenkernel/intern/packedFile.c2
-rw-r--r--source/blender/blenlib/intern/fileops.c2
-rw-r--r--source/blender/editors/space_file/filesel.c2
-rw-r--r--source/blender/editors/space_text/text_ops.c6
-rw-r--r--source/blender/imbuf/intern/thumbs.c4
-rw-r--r--source/blender/imbuf/intern/util.c2
7 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/blenkernel/intern/bpath.c b/source/blender/blenkernel/intern/bpath.c
index 6a51dadd28e..6699cbcff2d 100644
--- a/source/blender/blenkernel/intern/bpath.c
+++ b/source/blender/blenkernel/intern/bpath.c
@@ -235,7 +235,7 @@ static int findFileRecursive(char *filename_new,
BLI_join_dirfile(path, sizeof(path), dirname, de->d_name);
- if (stat(path, &status) != 0)
+ if (BLI_stat(path, &status) != 0)
continue; /* cant stat, don't bother with this file, could print debug info here */
if (S_ISREG(status.st_mode)) { /* is file */
diff --git a/source/blender/blenkernel/intern/packedFile.c b/source/blender/blenkernel/intern/packedFile.c
index af67ada7765..f97429d7e65 100644
--- a/source/blender/blenkernel/intern/packedFile.c
+++ b/source/blender/blenkernel/intern/packedFile.c
@@ -378,7 +378,7 @@ int checkPackedFile(const char *filename, PackedFile *pf)
BLI_strncpy(name, filename, sizeof(name));
BLI_path_abs(name, G.main->name);
- if (stat(name, &st)) {
+ if (BLI_stat(name, &st)) {
ret_val = PF_NOFILE;
}
else if (st.st_size != pf->size) {
diff --git a/source/blender/blenlib/intern/fileops.c b/source/blender/blenlib/intern/fileops.c
index d4a8b800f17..26fe0f21cd5 100644
--- a/source/blender/blenlib/intern/fileops.c
+++ b/source/blender/blenlib/intern/fileops.c
@@ -251,7 +251,7 @@ void *BLI_gzopen(const char *filename, const char *mode)
fclose(ufopen(filename, "a"));
/* temporary #if until we update all libraries to 1.2.7
- * for correct wide char path handling */
+ * for correct wide char path handling */
#if ZLIB_VERNUM >= 0x1270 && !defined(FREE_WINDOWS)
UTF16_ENCODE(filename);
diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c
index a31af851575..85e4d255603 100644
--- a/source/blender/editors/space_file/filesel.c
+++ b/source/blender/editors/space_file/filesel.c
@@ -667,7 +667,7 @@ bool autocomplete_directory(struct bContext *C, char *str, void *UNUSED(arg_v))
BLI_join_dirfile(path, sizeof(path), dirname, de->d_name);
- if (stat(path, &status) == 0) {
+ if (BLI_stat(path, &status) == 0) {
if (S_ISDIR(status.st_mode)) { /* is subdir */
autocomplete_do_name(autocpl, path);
}
diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c
index ca6bab1d1da..dec61a0e1ca 100644
--- a/source/blender/editors/space_text/text_ops.c
+++ b/source/blender/editors/space_text/text_ops.c
@@ -486,7 +486,7 @@ static void txt_write_file(Text *text, ReportList *reports)
fclose(fp);
- if (stat(filepath, &st) == 0) {
+ if (BLI_stat(filepath, &st) == 0) {
text->mtime = st.st_mtime;
}
else {
@@ -3107,7 +3107,7 @@ int text_file_modified(Text *text)
if (!BLI_exists(file))
return 2;
- result = stat(file, &st);
+ result = BLI_stat(file, &st);
if (result == -1)
return -1;
@@ -3134,7 +3134,7 @@ static void text_ignore_modified(Text *text)
if (!BLI_exists(file)) return;
- result = stat(file, &st);
+ result = BLI_stat(file, &st);
if (result == -1 || (st.st_mode & S_IFMT) != S_IFREG)
return;
diff --git a/source/blender/imbuf/intern/thumbs.c b/source/blender/imbuf/intern/thumbs.c
index 44358d8147e..59b78109aaf 100644
--- a/source/blender/imbuf/intern/thumbs.c
+++ b/source/blender/imbuf/intern/thumbs.c
@@ -319,7 +319,7 @@ ImBuf *IMB_thumb_create(const char *path, ThumbSize size, ThumbSource source, Im
}
if (img != NULL) {
- stat(path, &info);
+ BLI_stat(path, &info);
BLI_snprintf(mtime, sizeof(mtime), "%ld", (long int)info.st_mtime);
BLI_snprintf(cwidth, sizeof(cwidth), "%d", img->x);
BLI_snprintf(cheight, sizeof(cheight), "%d", img->y);
@@ -339,7 +339,7 @@ ImBuf *IMB_thumb_create(const char *path, ThumbSize size, ThumbSource source, Im
}
IMB_free_anim(anim);
}
- stat(path, &info);
+ BLI_stat(path, &info);
BLI_snprintf(mtime, sizeof(mtime), "%ld", (long int)info.st_mtime);
}
if (!img) return NULL;
diff --git a/source/blender/imbuf/intern/util.c b/source/blender/imbuf/intern/util.c
index fa1316f631f..234d80bf782 100644
--- a/source/blender/imbuf/intern/util.c
+++ b/source/blender/imbuf/intern/util.c
@@ -164,7 +164,7 @@ static int IMB_ispic_name(const char *name)
if (UTIL_DEBUG) printf("IMB_ispic_name: loading %s\n", name);
- if (stat(name, &st) == -1)
+ if (BLI_stat(name, &st) == -1)
return FALSE;
if (((st.st_mode) & S_IFMT) != S_IFREG)
return FALSE;