Perl-Toolchain-Gang / ExtUtils-MakeMaker

Perl module to make Makefiles and build modules (what backs Makefile.PL)
https://metacpan.org/release/ExtUtils-MakeMaker
64 stars 76 forks source link

Logic for detecting working on deps with spaces imperfect #394

Open mohawk2 opened 3 years ago

mohawk2 commented 3 years ago

The MM_Win32 override of quote_dep correctly knows gmake can work on deps with spaces, so falls back to the MM_Any version. That calls can_dep_space which is overridden in MM_Win32 to return true only if GetShortPathName works. When short pathnames are turned off, this gives a false negative.

A simple fix would be to not try the short pathname if on gmake, but a slightly better solution might be to separate the logic of knowing if can shorten paths, from whether one should even try.