fix of dir->file_list[i].file_type being accidentally overwritten

This commit is contained in:
nova
2026-05-21 00:06:39 +02:00
parent adb10b6d5d
commit f807fe56b5
2 changed files with 8 additions and 4 deletions

View File

@@ -215,8 +215,10 @@ void *thread_rgt(){
pthread_mutex_unlock(&mutex_mid);
if (rgt_dir.current_file->permissions & S_IRUSR) {
if (rgt_dir.current_file->file_type &= FILE_TYPE_DIR) {
if (rgt_dir.current_file->file_type & FILE_TYPE_DIR) {
#if SETTINGS_UEBERZUG_IMAGE_PREVIEW != 0
images_clear();
#endif
@@ -243,7 +245,7 @@ void *thread_rgt(){
rgt_dir.current_file->file_type |= FILE_TYPE_OPEN_FILE;
pthread_mutex_lock(&mutex_render);
werase(win_r);
if (rgt_dir.current_file->file_type == FILE_TYPE_OPEN_FILE) {
if (rgt_dir.current_file->file_type & FILE_TYPE_OPEN_FILE) {
mvwaddnstr(win_r, 0, 0, rgt_buffer, (terminal_width/2) * terminal_width);
} else if ((rgt_dir.current_file->permissions & S_IRUSR) == 0) {
mvwaddstr(win_r, 0, 0, "not accessible");