http://bugs.winehq.org/show_bug.cgi?id=18617
Summary: Regedit can't import registry from standard input Product: Wine Version: 1.1.22 Platform: PC-x86-64 OS/Version: Linux Status: NEW Keywords: regression, source, testcase Severity: normal Priority: P2 Component: programs AssignedTo: wine-bugs@winehq.org ReportedBy: vitaliy@kievinfo.com
Created an attachment (id=21305) --> (http://bugs.winehq.org/attachment.cgi?id=21305) Sample test program
Importing file like this works: ------------------- REGEDIT4
[HKEY_CURRENT_USER\Software\Wine\Direct3D] "UseGLSL"="enabled" -------------------
However this command doesn't work: echo -e 'REGEDIT4\n[HKEY_CURRENT_USER\Software\Wine\Direct3D]\n"UseGLSL"="enabled"\n' | wine regedit -
This is due to this piece of code: if (fread( s, 2, 1, reg_file) == 1) { if (s[0] == 0xff && s[1] == 0xfe) { processRegLinesW(reg_file); } else { -> rewind(reg_file); processRegLinesA(reg_file); } }
According to MS doing rewind on stdin clears the buffer. Sample program attached.
http://bugs.winehq.org/show_bug.cgi?id=18617
Ken Sharp kennybobs@o2.co.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |kennybobs@o2.co.uk
http://bugs.winehq.org/show_bug.cgi?id=18617
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download
--- Comment #1 from Austin English austinenglish@gmail.com 2009-05-26 10:23:49 --- Are you sure it's a regression? Where's the regression test?
http://bugs.winehq.org/show_bug.cgi?id=18617
Vitaliy Margolen vitaliy@kievinfo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |alex@thehandofagony.com
--- Comment #2 from Vitaliy Margolen vitaliy@kievinfo.com 2009-05-26 19:41:31 --- Yes, I'm sure this is a regression, I uses it that way. Also what's the code doing in there that interprets "-" filename as "stdin"?
No need for regression testing, first patch that added rewind is to blame: 6f2e3e1b (Alexander Nicolaysen Sørnes 2008-07-09 23:39:08 +0200 1376) rewind(reg_file);
$git show 6f2e3e1b commit 6f2e3e1b1ecce90f98d6e84170a3185a28661d1d Author: Alexander Nicolaysen Sørnes alex@thehandofagony.com Date: Wed Jul 9 23:39:08 2008 +0200
regedit: Add support for importing Unicode files.
http://bugs.winehq.org/show_bug.cgi?id=18617
Alexander Nicolaysen Sørnes alex@thehandofagony.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #3 from Alexander Nicolaysen Sørnes alex@thehandofagony.com 2009-06-17 10:46:41 --- I have sent a patch for this, and it has been applied. Thanks for reporting the issue, Vitaliy.
http://bugs.winehq.org/show_bug.cgi?id=18617
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #4 from Alexandre Julliard julliard@winehq.org 2009-06-19 11:07:51 --- Closing bugs fixed in 1.1.24.