Ticket #593: padre-patch-win32-recent-files.patch

File padre-patch-win32-recent-files.patch, 1.5 KB (added by getty, 5 years ago)

patch for the problem

  • lib/Padre/File/Local.pm

     
    1111our $VERSION = '0.46'; 
    1212our @ISA     = 'Padre::File'; 
    1313 
     14use constant IS_WIN32 => !!( $^O =~ /^MSWin/ or $^O eq 'cygwin' ); 
     15 
     16if (IS_WIN32) { 
     17    require Win32; 
     18} 
     19 
    1420sub new { 
    1521    my $class = shift; 
    1622    my $self = bless { Filename => $_[0] }, $class; 
    1723    $self->{protocol} = 'local'; # Should not be overridden 
    1824 
     25    if (IS_WIN32) { 
     26        # Fixing the case of the filename on Win32.  
     27        $self->{Filename} = Win32::GetLongPathName($self->{Filename}); 
     28    } 
     29 
    1930    # Convert the filename to correct format. On Windows C:\dir\file.pl and C:/dir/file.pl are the same 
    2031    # file but have different names. 
    2132    $self->{Filename} = File::Spec->catfile(File::Spec->splitdir(File::Basename::dirname($self->{Filename})),File::Basename::basename($self->{Filename})); 
  • Makefile.PL

     
    100100requires       'URI'                      => '0'; 
    101101requires       'version'                  => 0; 
    102102requires       'Win32::API'               => '0.58' if win32; 
     103requires       'Win32'                    => '0.39' if win32; 
    103104requires       'Wx'                       => '0.91'; 
    104105requires       'Wx::Perl::ProcessStream'  => '0.11'; 
    105106requires       'YAML::Tiny'               => '1.32';