diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-11-01 05:15:10 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-11-01 05:15:10 +0300 |
commit | e2937ff24fc833d64f1aa94b07079ad168e300ce (patch) | |
tree | 3d509ed5b0259276baa8838663eed0b6059104d0 /source/blender/editors | |
parent | c312c7196944b095fbd1b74c085a3af1e64409ce (diff) | |
parent | a0633e2484f21c9f80842c10b46b3af98b54d25a (diff) |
Merge branch 'blender-v3.0-release'
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/space_file/file_ops.c | 6 | ||||
-rw-r--r-- | source/blender/editors/space_file/fsmenu.c | 19 |
2 files changed, 14 insertions, 11 deletions
diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c index 4eb10e65867..844514759f3 100644 --- a/source/blender/editors/space_file/file_ops.c +++ b/source/blender/editors/space_file/file_ops.c @@ -2491,12 +2491,14 @@ static void file_expand_directory(bContext *C) if (BLI_path_is_rel(params->dir)) { /* Use of 'default' folder here is just to avoid an error message on '//' prefix. */ BLI_path_abs(params->dir, - G.relbase_valid ? BKE_main_blendfile_path(bmain) : BKE_appdir_folder_default()); + G.relbase_valid ? BKE_main_blendfile_path(bmain) : + BKE_appdir_folder_default_or_root()); } else if (params->dir[0] == '~') { char tmpstr[sizeof(params->dir) - 1]; BLI_strncpy(tmpstr, params->dir + 1, sizeof(tmpstr)); - BLI_join_dirfile(params->dir, sizeof(params->dir), BKE_appdir_folder_default(), tmpstr); + BLI_path_join( + params->dir, sizeof(params->dir), BKE_appdir_folder_default_or_root(), tmpstr, NULL); } else if (params->dir[0] == '\0') diff --git a/source/blender/editors/space_file/fsmenu.c b/source/blender/editors/space_file/fsmenu.c index 091c2d5f434..97f22ca7d89 100644 --- a/source/blender/editors/space_file/fsmenu.c +++ b/source/blender/editors/space_file/fsmenu.c @@ -769,21 +769,22 @@ void fsmenu_read_system(struct FSMenu *fsmenu, int read_bookmarks) FS_INSERT_LAST); const char *home = BLI_getenv("HOME"); - + if (home) { # define FS_MACOS_PATH(path, name, icon) \ BLI_snprintf(line, sizeof(line), path, home); \ fsmenu_insert_entry(fsmenu, FS_CATEGORY_OTHER, line, name, icon, FS_INSERT_LAST); - FS_MACOS_PATH("%s/", NULL, ICON_HOME) - FS_MACOS_PATH("%s/Desktop/", N_("Desktop"), ICON_DESKTOP) - FS_MACOS_PATH("%s/Documents/", N_("Documents"), ICON_DOCUMENTS) - FS_MACOS_PATH("%s/Downloads/", N_("Downloads"), ICON_IMPORT) - FS_MACOS_PATH("%s/Movies/", N_("Movies"), ICON_FILE_MOVIE) - FS_MACOS_PATH("%s/Music/", N_("Music"), ICON_FILE_SOUND) - FS_MACOS_PATH("%s/Pictures/", N_("Pictures"), ICON_FILE_IMAGE) - FS_MACOS_PATH("%s/Library/Fonts/", N_("Fonts"), ICON_FILE_FONT) + FS_MACOS_PATH("%s/", NULL, ICON_HOME) + FS_MACOS_PATH("%s/Desktop/", N_("Desktop"), ICON_DESKTOP) + FS_MACOS_PATH("%s/Documents/", N_("Documents"), ICON_DOCUMENTS) + FS_MACOS_PATH("%s/Downloads/", N_("Downloads"), ICON_IMPORT) + FS_MACOS_PATH("%s/Movies/", N_("Movies"), ICON_FILE_MOVIE) + FS_MACOS_PATH("%s/Music/", N_("Music"), ICON_FILE_SOUND) + FS_MACOS_PATH("%s/Pictures/", N_("Pictures"), ICON_FILE_IMAGE) + FS_MACOS_PATH("%s/Library/Fonts/", N_("Fonts"), ICON_FILE_FONT) # undef FS_MACOS_PATH + } /* Get mounted volumes better method OSX 10.6 and higher, see: * https://developer.apple.com/library/mac/#documentation/CoreFOundation/Reference/CFURLRef/Reference/reference.html |