[Win32utils-devel] Problems with win32-dir and create_junction
Daniel.Berger at qwest.com
Thu Oct 2 10:11:35 EDT 2008
> -----Original Message-----
> From: win32utils-devel-bounces at rubyforge.org
> [mailto:win32utils-devel-bounces at rubyforge.org] On Behalf Of
> Heesob Park
> Sent: Thursday, October 02, 2008 7:59 AM
> To: Development and ideas for win32utils projects
> Subject: Re: [Win32utils-devel] Problems with win32-dir and
> 2008/10/2 Daniel Berger <djberg96 at gmail.com>:
> > Hi,
> > I don't know when this started happening, but I can't
> win32-dir tests
> > to pass any more for the create_junction method.
> > It looks like the junction is created, but it's not valid.
> Here's the
> > results of the tests on Vista using the latest from CVS:
> > Started
> > ....................E.E.................................
> > Finished in 0.477 seconds.
> > 1) Error:
> > test_create_junction_ascii(TC_Win32_Dir):
> > Errno::EINVAL: Invalid argument - test_to_directory
> > ./test/test_dir.rb:38:in `open'
> > ./test/test_dir.rb:38:in `entries'
> > ./test/test_dir.rb:38:in `test_create_junction_ascii'
> > 2) Error:
> > test_create_junction_unicode(TC_Win32_Dir):
> > Errno::EINVAL: Invalid argument - ╬ò╬╗╬╗╬¼╧â
> > ./test/test_dir.rb:44:in `open'
> > ./test/test_dir.rb:44:in `entries'
> > ./test/test_dir.rb:44:in `test_create_junction_unicode'
> > 56 tests, 111 assertions, 0 failures, 2 errors, 0 pendings, 0
> > omissions, 0 notifications rake aborted!
> > Command failed with status (1): [C:/Ruby/bin/ruby -w -Ilib
> > "C:/Ruby/lib/rub...]
> > (See full trace by running task with --trace)
> > Any ideas?
> It is due to the change of multi_to_wide method.
> Trailing \0's and wide_string.size mismatch problem.
> Modify line#111 of dir.rb
> wide_string = multi_to_wide(buf_target) To
> wide_string = multi_to_wide(buf_target)[0..-3] works for
> me in case of ascii junction.
Ah, ok. Thanks.
Do you think we should automatically strip the trailing "\000\000" in the multi_to_wide method then? I think this would work because I modified wide_to_multi to automatically append "\000\000" to the incoming string if they weren't already there.
> In case of the unicode, more work is needed.
This communication is the property of Qwest and may contain confidential or
privileged information. Unauthorized use of this communication is strictly
prohibited and may be unlawful. If you have received this communication
in error, please immediately notify the sender by reply e-mail and destroy
all copies of the communication and any attachments.
More information about the win32utils-devel