KFM - disabling the normalization of the names of files and directories, because some file systems are case sensitive.

git-svn-id: svn://kolibrios.org@3731 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Marat Zakiyanov (Mario79) 2013-06-28 23:57:00 +00:00
parent f44c78c5fc
commit 976e2d52bf
4 changed files with 75 additions and 53 deletions

View File

@ -202,9 +202,13 @@ align 4
delete_dir_data: delete_dir_data:
rb 32 rb 32
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
align 4
extension_temp_storage:
rb 256
;---------------------------------------------------------------------
;stack ;stack
align 4 align 4
rb 512 rb 4096
stacktop: stacktop:
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
align 4 align 4

View File

@ -97,7 +97,7 @@ proc_read_left_folder:
jne .error jne .error
@@: @@:
push eax push eax
call left_files_name_normalize ; call left_files_name_normalize
call left_prepare_extension_start call left_prepare_extension_start
call left_sort_files call left_sort_files
pop eax pop eax
@ -201,7 +201,7 @@ proc_read_right_folder:
jne .error jne .error
@@: @@:
push eax push eax
call right_files_name_normalize ; call right_files_name_normalize
call right_prepare_extension_start call right_prepare_extension_start
call right_sort_files call right_sort_files
pop eax pop eax

View File

@ -254,55 +254,55 @@ left_prepare_extension_start_1:
jb .start jb .start
ret ret
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
left_files_name_normalize: ;left_files_name_normalize:
xor ebp,ebp ; xor ebp,ebp
mov esi,[left_folder_data] ; mov esi,[left_folder_data]
add esi,32+40 ; add esi,32+40
.start: ;.start:
push esi ; push esi
mov al,[esi] ; mov al,[esi]
call char_toupper ; call char_toupper
mov [esi],al ; mov [esi],al
@@: ;@@:
inc esi ; inc esi
mov al,[esi] ; mov al,[esi]
test al,al ; test al,al
jz @f ; jz @f
call char_todown ; call char_todown
mov [esi],al ; mov [esi],al
jmp @b ; jmp @b
@@: ;@@:
pop esi ; pop esi
add esi,304 ; add esi,304
inc ebp ; inc ebp
cmp ebp,[left_folder_block] ; cmp ebp,[left_folder_block]
jb .start ; jb .start
ret ; ret
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
right_files_name_normalize: ;right_files_name_normalize:
xor ebp,ebp ; xor ebp,ebp
mov esi,[right_folder_data] ; mov esi,[right_folder_data]
add esi,32+40 ; add esi,32+40
.start: ;.start:
push esi ; push esi
mov al,[esi] ; mov al,[esi]
call char_toupper ; call char_toupper
mov [esi],al ; mov [esi],al
@@: ;@@:
inc esi ; inc esi
mov al,[esi] ; mov al,[esi]
test al,al ; test al,al
jz @f ; jz @f
call char_todown ; call char_todown
mov [esi],al ; mov [esi],al
jmp @b ; jmp @b
@@: ;@@:
pop esi ; pop esi
add esi,304 ; add esi,304
inc ebp ; inc ebp
cmp ebp,[right_folder_block] ; cmp ebp,[right_folder_block]
jb .start ; jb .start
ret ; ret
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
right_prepare_extension_start: right_prepare_extension_start:
xor ebp,ebp xor ebp,ebp

View File

@ -1,13 +1,16 @@
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
get_icon_number: get_icon_number:
mov ebp,[extension_size] ;[icons_end_tag] mov ebp,[extension_size] ;[icons_end_tag]
test ebp,ebp
jz .end
call normalize_extension_of_file
mov edx,[icons_end_tag] mov edx,[icons_end_tag]
mov edi,[ini_file_start] mov edi,[ini_file_start]
dec edi dec edi
.search_association: .search_association:
cmp edx,edi cmp edx,edi
jbe .end jbe .end
mov esi,[extension_start] mov esi,extension_temp_storage
mov ecx,ebp mov ecx,ebp
test ecx,ecx test ecx,ecx
je @f je @f
@ -51,6 +54,20 @@ get_icon_number:
sub eax,0x30 sub eax,0x30
ret ret
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
normalize_extension_of_file:
push edi
mov esi,[extension_start]
mov edi,extension_temp_storage
cld
@@:
lodsb
call char_todown
stosb
test al,al
jnz @b
pop edi
ret
;---------------------------------------------------------------------
open_file_with_appl_1: open_file_with_appl_1:
mov ebp,files_associations_1 mov ebp,files_associations_1
jmp open_file_with_appl.1 jmp open_file_with_appl.1
@ -64,10 +81,11 @@ open_file_with_appl:
call search_star_and_end_tags call search_star_and_end_tags
cmp ebp,-1 cmp ebp,-1
je .end je .end
call normalize_extension_of_file
.search_association: .search_association:
cmp [end_tag],edi cmp [end_tag],edi
jbe .end jbe .end
mov esi,[extension_start] ;extension_temp_area mov esi,extension_temp_storage
mov ecx,[extension_size] mov ecx,[extension_size]
inc edi inc edi
cld cld