File tree Expand file tree Collapse file tree 4 files changed +10
-9
lines changed Expand file tree Collapse file tree 4 files changed +10
-9
lines changed Original file line number Diff line number Diff 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
125123namespace {
Original file line number Diff line number Diff line change @@ -40,11 +40,12 @@ using std::ifstream;
4040using std::ofstream;
4141using 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 ;
Original file line number Diff line number Diff 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 * 检查文件是否存在
Original file line number Diff line number Diff line change 2121# TBOX版本号
2222TBOX_VERSION_MAJOR := 1
2323TBOX_VERSION_MINOR := 12
24- TBOX_VERSION_REVISION := 13
24+ TBOX_VERSION_REVISION := 15
You can’t perform that action at this time.
0 commit comments