diff options
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index fcaf53da81b..8a2f48ba991 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -2652,7 +2652,7 @@ static int rna_FileBrowser_FileSelectEntry_name_editable(PointerRNA *ptr, const static void rna_FileBrowser_FileSelectEntry_name_get(PointerRNA *ptr, char *value) { const FileDirEntry *entry = ptr->data; - strcpy(value, entry->name); + BLI_strncpy_utf8(value, entry->name, strlen(entry->name) + 1); } static int rna_FileBrowser_FileSelectEntry_name_length(PointerRNA *ptr) @@ -2664,7 +2664,7 @@ static int rna_FileBrowser_FileSelectEntry_name_length(PointerRNA *ptr) static void rna_FileBrowser_FileSelectEntry_relative_path_get(PointerRNA *ptr, char *value) { const FileDirEntry *entry = ptr->data; - strcpy(value, entry->relpath); + BLI_strncpy_utf8(value, entry->relpath, strlen(entry->relpath) + 1); } static int rna_FileBrowser_FileSelectEntry_relative_path_length(PointerRNA *ptr) @@ -6344,7 +6344,7 @@ static void rna_def_fileselect_entry(BlenderRNA *brna) RNA_def_struct_sdna(srna, "FileDirEntry"); RNA_def_struct_ui_text(srna, "File Select Entry", "A file viewable in the File Browser"); - prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE); + prop = RNA_def_property(srna, "name", PROP_STRING, PROP_FILENAME); RNA_def_property_editable_func(prop, "rna_FileBrowser_FileSelectEntry_name_editable"); RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_string_funcs(prop, @@ -6354,7 +6354,7 @@ static void rna_def_fileselect_entry(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Name", ""); RNA_def_struct_name_property(srna, prop); - prop = RNA_def_property(srna, "relative_path", PROP_STRING, PROP_NONE); + prop = RNA_def_property(srna, "relative_path", PROP_STRING, PROP_FILEPATH); RNA_def_property_string_funcs(prop, "rna_FileBrowser_FileSelectEntry_relative_path_get", "rna_FileBrowser_FileSelectEntry_relative_path_length", |