Option --assume-execute-permission

modified:   main.cpp
	modified:   options.h
	modified:   p_unix.cpp
https://github.com/upx/upx/issues/256
This commit is contained in:
John Reiser
2019-03-31 10:25:06 -07:00
parent 47ddace96a
commit 4484acf9d6
3 changed files with 7 additions and 3 deletions
+2 -3
View File
@@ -63,11 +63,10 @@ bool PackUnix::canPack()
if (exetype == 0)
return false;
#if defined(__unix__) && !defined(__MSYS2__)
// must be executable by owner
if ((fi->st.st_mode & S_IXUSR) == 0)
if (!opt->o_unix.assume_execute_permission // benefits __MSYS2__
&& (fi->st.st_mode & S_IXUSR) == 0)
throwCantPack("file not executable; try 'chmod +x'");
#endif
if (file_size < 4096)
throwCantPack("file is too small");