diff --git a/source/blender/editors/space_file/file_ops.cc b/source/blender/editors/space_file/file_ops.cc index 0c72ccd717d..c94dfa8ed4c 100644 --- a/source/blender/editors/space_file/file_ops.cc +++ b/source/blender/editors/space_file/file_ops.cc @@ -1865,6 +1865,17 @@ static wmOperatorStatus file_external_operation_exec(bContext *C, wmOperator *op #ifdef WIN32 const FileExternalOperation operation = (FileExternalOperation)RNA_enum_get(op->ptr, "operation"); + + if (!(fileentry->typeflag & FILE_TYPE_DIR) && + ELEM(operation, FILE_EXTERNAL_OPERATION_FOLDER_OPEN, FILE_EXTERNAL_OPERATION_FOLDER_CMD)) + { + /* Not a folder path, so for these operations use the root. */ + const char *root = filelist_dir(sfile->files); + if (BLI_file_external_operation_execute(root, operation)) { + WM_cursor_set(CTX_wm_window(C), WM_CURSOR_DEFAULT); + return OPERATOR_FINISHED; + } + } if (BLI_file_external_operation_execute(filepath, operation)) { WM_cursor_set(CTX_wm_window(C), WM_CURSOR_DEFAULT); return OPERATOR_FINISHED;