Skip Menu |

This queue is for tickets about the Win32API-File CPAN distribution.

Report information
The Basics
Id: 106377
Status: new
Priority: 0/
Queue: Win32API-File

People
Owner: Nobody in particular
Requestors: MITHALDU [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.1202
Fixed in: (no value)



Subject: W variants seem to include trash in filename strings
With this example script, either the first one will generate a file with random bytes at the end of its name; or the latter one will fail to find a.bak due to searching for a file with random bytes and/or different random bytes at its end. Dunno if i'm using this wrong or whether it's an XS issue. use Encode; use Win32API::File qw( MoveFileW fileLastError ); open my $f, ">", "a"; close $f; sleep 1; MoveFileW encode( "UTF16-LE", "a" ), encode( "UTF16-LE", "a.bak" ) or die fileLastError; sleep 1; MoveFileW encode( "UTF16-LE", "a.bak" ), encode( "UTF16-LE", "a" ) or die fileLastError;