Skip to content

Commit 8f6035e

Browse files
committed
Merge branch 'develop'
2 parents 532d8e2 + 4cf9355 commit 8f6035e

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

modules/terminal/impl/terminal_key_events.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,9 @@ void Terminal::Impl::onDeleteKey(SessionContext *s)
115115
}
116116
}
117117

118-
void Terminal::Impl::onTabKey(SessionContext *s)
118+
void Terminal::Impl::onTabKey(SessionContext *)
119119
{
120120
//!TODO: 实现补全功能
121-
LogUndo();
122-
(void)s;
123121
}
124122

125123
namespace {

modules/util/fs.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,12 @@ using std::ifstream;
4040
using std::ofstream;
4141
using std::exception;
4242

43-
FileType GetFileType(const std::string &file_path)
43+
FileType GetFileType(const std::string &file_path, bool refer_to_real_file)
4444
{
45-
struct stat st;
45+
auto func = refer_to_real_file ? (::stat) : (::lstat);
4646

47-
if (::stat(file_path.c_str(), &st) == 0) {
47+
struct stat st;
48+
if (func(file_path.c_str(), &st) == 0) {
4849
if (S_ISDIR(st.st_mode)) return FileType::kDirectory;
4950
if (S_ISREG(st.st_mode)) return FileType::kRegular;
5051
if (S_ISCHR(st.st_mode)) return FileType::kCharacterDevice;

modules/util/fs.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,12 @@ enum class FileType {
4747
/**
4848
* 获取文件类型
4949
*
50-
* \param file_path 文件路径
50+
* \param file_path 文件路径
51+
* \param refer_to_real_file 如果是符号链接文件,是否指向真实的文件
52+
*
5153
* \return FileType 文件类型
5254
*/
53-
FileType GetFileType(const std::string &file_path);
55+
FileType GetFileType(const std::string &file_path, bool refer_to_real_file = false);
5456

5557
/**
5658
* 检查文件是否存在

version.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@
2121
# TBOX版本号
2222
TBOX_VERSION_MAJOR := 1
2323
TBOX_VERSION_MINOR := 12
24-
TBOX_VERSION_REVISION := 13
24+
TBOX_VERSION_REVISION := 15

0 commit comments

Comments
 (0)