From 13b10bc06f6898b73ec7c9f4e76ed8578a1b1ca3 Mon Sep 17 00:00:00 2001 From: "Marat Zakiyanov (Mario79)" Date: Thu, 20 Jun 2013 00:33:36 +0000 Subject: [PATCH] process_replace_file_name - uses the correct direction of search is now git-svn-id: svn://kolibrios.org@3689 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/fs/fs_lfn.inc | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/kernel/trunk/fs/fs_lfn.inc b/kernel/trunk/fs/fs_lfn.inc index 1f819b1f84..668eeea457 100644 --- a/kernel/trunk/fs/fs_lfn.inc +++ b/kernel/trunk/fs/fs_lfn.inc @@ -932,31 +932,30 @@ biosdisk_enum_root: pop eax inc eax ret - +;----------------------------------------------------------------------------- process_replace_file_name: ; in ; esi - path with filename(f.70) ; ; out ; ebp - full filename - pushfd - cli + pushfd + cli mov ebp, [full_file_name_table] - mov edi, [full_file_name_table.size] - dec edi - shl edi, 7 - add edi, ebp + xor edi, edi .loop: - cmp edi, ebp - jb .notfound + cmp edi,[full_file_name_table.size] + jae .notfound push esi edi + shl edi, 7 ; edi*128 + add edi, ebp @@: - cmp byte [edi], 0 + cmp byte [edi], 0 ; end of dir_name jz .dest_done lodsb test al, al jz .cont - or al, 20h + or al, 20h ; 32 - space char scasb jz @b jmp .cont @@ -969,10 +968,12 @@ process_replace_file_name: jmp .found .cont: pop edi esi - sub edi, 128 + inc edi jmp .loop .found: pop edi eax + shl edi, 7 ; edi*128 + add edi, ebp mov ebp, esi cmp byte [esi], 0 lea esi, [edi+64] @@ -980,9 +981,9 @@ process_replace_file_name: .notfound: xor ebp, ebp .ret: - popfd + popfd ret - +;----------------------------------------------------------------------------- uglobal lock_flag_for_f30_3 rb 1 endg