summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/ecore_file/ecore_file.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/ecore_file/ecore_file.c b/src/lib/ecore_file/ecore_file.c
index 528de6a97a..83fca2600e 100644
--- a/src/lib/ecore_file/ecore_file.c
+++ b/src/lib/ecore_file/ecore_file.c
@@ -643,7 +643,7 @@ ecore_file_can_exec(const char *file)
643 h = CreateFile(file, GENERIC_READ, FILE_SHARE_READ, NULL, 643 h = CreateFile(file, GENERIC_READ, FILE_SHARE_READ, NULL,
644 OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0); 644 OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
645 if (h == INVALID_HANDLE_VALUE) 645 if (h == INVALID_HANDLE_VALUE)
646 return EINA_FALSE; 646 goto test_bat;
647 647
648 if (!GetFileSizeEx(h, &sz)) 648 if (!GetFileSizeEx(h, &sz))
649 goto close_h; 649 goto close_h;
@@ -697,16 +697,16 @@ ecore_file_can_exec(const char *file)
697 */ 697 */
698 if ((characteristics & 0x0002) && !(characteristics & 0x2000)) 698 if ((characteristics & 0x0002) && !(characteristics & 0x2000))
699 return EINA_TRUE; 699 return EINA_TRUE;
700 700 unmap_view:
701 UnmapViewOfFile(base);
702 close_h:
703 CloseHandle(h);
704 test_bat:
701 /* 705 /*
702 * a .bat file, considered as an executable, is only a text file, 706 * a .bat file, considered as an executable, is only a text file,
703 * so we rely on the extension. Not the best but we cannot do more. 707 * so we rely on the extension. Not the best but we cannot do more.
704 */ 708 */
705 return eina_str_has_extension(file, ".bat"); 709 return eina_str_has_extension(file, ".bat");
706 unmap_view:
707 UnmapViewOfFile(base);
708 close_h:
709 CloseHandle(h);
710#else 710#else
711 if (!access(file, X_OK)) return EINA_TRUE; 711 if (!access(file, X_OK)) return EINA_TRUE;
712#endif 712#endif