http://bugs.winehq.org/show_bug.cgi?id=20049
Summary: Path Problems with SaveDialog Product: Wine Version: 1.0.0 Platform: PC OS/Version: Linux Status: UNCONFIRMED Severity: blocker Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: studioragcortelli@tiscali.it
Hello, I have a problem with SaveDialog. I wrote a software with Lazarus (vers. 0.9.26.2) and if I use the component SaveDialog to choose the path where saving a file I have a problem: the path fails a character.
For example: C:\MyErp\Source\myfile.exe is: C:\MyErp\Sourc\myfile.exe
(Source is now only 'Sourc')...
Under Windows everything runs ok.
Even installing Lazarus and wanting to load a component, there is the same path error: a character is missing.
With the SelectDirectory component there are no problmes.
I apologize for my bad English.
Best regards,
Stefano
(Preferred languages: Italiano, Français, Deutsch)
http://bugs.winehq.org/show_bug.cgi?id=20049
CortelliStefano studioragcortelli@tiscali.it changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |studioragcortelli@tiscali.i | |t
http://bugs.winehq.org/show_bug.cgi?id=20049
--- Comment #1 from CortelliStefano studioragcortelli@tiscali.it 2009-09-14 10:27:01 --- There is the same problem also with the OpenDialog Component. A letter of the path miss.
Best regards,
Stefano
(Preferred languages: Italiano, Français, Deutsch)
http://bugs.winehq.org/show_bug.cgi?id=20049
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Severity|blocker |minor
--- Comment #2 from Nikolay Sivov bunglehead@gmail.com 2009-09-14 10:34:34 --- Hi, Stefano.
Please try with Wine 1.1.29. Version 1.0.0 is too old.
P.S. No need to CC yourself if you're a reporter.
http://bugs.winehq.org/show_bug.cgi?id=20049
--- Comment #3 from CortelliStefano studioragcortelli@tiscali.it 2009-09-14 11:56:08 --- Thank you for your reply. I have vers. 1.1.29 installed on my Ubuntu 8.0.4.
Unfortunately is the problem remains as before.
A character of the path miss.
Best regards,
Stefano
(Preferred languages: Italiano, Français, Deutsch)
http://bugs.winehq.org/show_bug.cgi?id=20049
CortelliStefano studioragcortelli@tiscali.it changed:
What |Removed |Added ---------------------------------------------------------------------------- CC|studioragcortelli@tiscali.i | |t |
http://bugs.winehq.org/show_bug.cgi?id=20049
--- Comment #4 from Austin English austinenglish@gmail.com 2009-09-14 12:31:56 --- This is a program you wrote, right?
Can you attach a testcase? Preferably with source.
http://bugs.winehq.org/show_bug.cgi?id=20049
--- Comment #5 from CortelliStefano studioragcortelli@tiscali.it 2009-09-15 01:52:43 --- Created an attachment (id=23604) --> (http://bugs.winehq.org/attachment.cgi?id=23604) Source - Pascal Code unit filecrypt, that OpenFile and SaveFile component has:
procedure TfrmFileCrypt.btnSaveFileClick(Sender: TObject);
var
F: String;
begin
Edit2.Text := '';
F := ''; //Default
SaveDialog1.FileName := ''; SaveDialog1.InitialDir := ''; //PrnFilePath;
SaveDialog1.Options := [ofOverwritePrompt];
SaveDialog1.Execute;
F := Trim(SaveDialog1.FileName);
SaveDialog1.Close;
if (F <> '') then begin
Edit2.Text := F;
end;
end;
procedure TfrmFileCrypt.btnOpenFileClick(Sender: TObject);
var
F: String;
begin
Edit1.Text := '';
F := ''; //Default
OpenDialog1.FileName := ''; OpenDialog1.InitialDir := ''; //PrnFilePath;
OpenDialog1.Options := [ofOverwritePrompt];
OpenDialog1.Execute;
F := Trim(OpenDialog1.FileName);
OpenDialog1.Close;
if (F <> '') then begin
Edit1.Text := F;
end;
end;
http://bugs.winehq.org/show_bug.cgi?id=20049
--- Comment #6 from CortelliStefano studioragcortelli@tiscali.it 2009-09-15 02:06:14 --- Created an attachment (id=23605) --> (http://bugs.winehq.org/attachment.cgi?id=23605) Executable
To run the program:
- Unzip the file; - Run the exe file (myerp_trywine.exe); - Utilità --> Criptografia files; - Button "Apri file" and/or "Salva come":
You can see, that the selected file miss a character in the Edit Text.
Note: I have the other procedures of my software disabled, because those require Databases.
http://bugs.winehq.org/show_bug.cgi?id=20049
--- Comment #7 from CortelliStefano studioragcortelli@tiscali.it 2009-09-15 02:16:04 --- Yes, it is a program I wrote, richtig. I have attached the executable file and the source.
However there is the same problem also with Lazarus (http://www.lazarus.freepascal.org).
I can install Lazarus under Wine and es is ok. But if I install a new component (Package --> Open file LPK) there is the same problem, the path of the selected component (LPK file) miss a character.
Lazarus is a project for a development software, a clone of Delphi, but Open Source. I think, that it is great, that also Lazarus under Wine runs, because installing Lazarus under Linux is very very difficoult. With Wine there are no problems.
The old version of Lazarus (0.9.13) worked very good under Wine, the new version (0.9.26.2 or 0.9.29 SVN) has changes, because the strings are now Unicode compatible. However the current version of Lazarus runs ok without problems under Windows.
Best Regards,
Stefano
(Preferred languages: Italiano, Français, Deutsch)
http://bugs.winehq.org/show_bug.cgi?id=20049
CortelliStefano studioragcortelli@tiscali.it changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|1.0.0 |1.1.29
http://bugs.winehq.org/show_bug.cgi?id=20049
--- Comment #8 from Paul Vriens Paul.Vriens.Wine@gmail.com 2009-09-15 03:51:05 --- Created an attachment (id=23606) --> (http://bugs.winehq.org/attachment.cgi?id=23606) Patch for comdlg32
http://bugs.winehq.org/show_bug.cgi?id=20049
Paul Vriens Paul.Vriens.Wine@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |Paul.Vriens.Wine@gmail.com
--- Comment #9 from Paul Vriens Paul.Vriens.Wine@gmail.com 2009-09-15 03:52:32 --- Please try the attached patch. It fixes the issue, when I tried out lazarus, for me.
http://bugs.winehq.org/show_bug.cgi?id=20049
--- Comment #10 from CortelliStefano studioragcortelli@tiscali.it 2009-09-15 04:28:05 --- Thank you for your reply. Have you a step-to-step to do, in order to upgrade Wine with your patch? Ich bin newbie with Wine...
Thank you very much.
Best regards,
Stefano
(Preferred languages: Italiano, Français, Deutsch)
http://bugs.winehq.org/show_bug.cgi?id=20049
--- Comment #11 from Paul Vriens Paul.Vriens.Wine@gmail.com 2009-09-15 04:32:17 --- You need to have the Wine source. After that:
http://wiki.winehq.org/Patching
http://bugs.winehq.org/show_bug.cgi?id=20049
--- Comment #12 from CortelliStefano studioragcortelli@tiscali.it 2009-09-15 07:01:51 --- Thank you again for your reply. Unfortunately I don't know how to install the sources of Wine. I use Ubuntu and in Synaptic I found only Wine-dev.
Where can I find the sources? In which directory should I install?
I tried to search in Internet, but I could not find a step-to-step that allows me to install the patch.
Have you maybe a link with a step-to-step?
Or should I wait for the next version of Wine?
Thank you again.
Best Regards,
Stefano
(Preferred languages: Italiano, Français, Deutsch)
http://bugs.winehq.org/show_bug.cgi?id=20049
--- Comment #13 from Paul Vriens Paul.Vriens.Wine@gmail.com 2009-09-15 07:42:36 --- I sent the patch (with a test case) to wine-patches. If all goes well it will incorporated in the next version (Friday).
Sorry, don't have much time to talk you through retrieving and compiling the source (hope somebody else chimes in here).
http://bugs.winehq.org/show_bug.cgi?id=20049
--- Comment #14 from Paul Vriens Paul.Vriens.Wine@gmail.com 2009-09-15 08:22:38 --- You could try:
http://bugs.winehq.org/show_bug.cgi?id=20049
Vitaliy Margolen vitaliy@kievinfo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |source Status|UNCONFIRMED |NEW Ever Confirmed|0 |1
--- Comment #15 from Vitaliy Margolen vitaliy@kievinfo.com 2009-09-15 08:27:52 --- Confirming per comment # 9.
http://bugs.winehq.org/show_bug.cgi?id=20049
--- Comment #16 from Austin English austinenglish@gmail.com 2009-09-15 11:18:06 --- (In reply to comment #13)
Sorry, don't have much time to talk you through retrieving and compiling the source (hope somebody else chimes in here).
This is why it was added to the FAQ ;-)
http://wiki.winehq.org/FAQ#head-7ed3c3163e2b932ee2030a48f9c5e553dc41817b
http://bugs.winehq.org/show_bug.cgi?id=20049
Bruno Jesus myxfce@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |myxfce@gmail.com
--- Comment #17 from Bruno Jesus myxfce@gmail.com 2009-09-15 13:29:37 --- Hi, passing to help and say the patch fixes the problem, tested under 1.1.28 and 29, but it left me thinking. Why the strlen function would not count the last charecter? It looks like a hack to add 1 =)
I have built a simple vb6 app to test and it works well before and after the patch. I'm wondering if this is really a bug in wine, does it happen on other applications?
http://bugs.winehq.org/show_bug.cgi?id=20049
--- Comment #18 from Bruno Jesus myxfce@gmail.com 2009-09-15 13:30:21 --- Created an attachment (id=23613) --> (http://bugs.winehq.org/attachment.cgi?id=23613) Simple VB6 test app for COMDLG
Will need vb6 runtime. Source included.
http://bugs.winehq.org/show_bug.cgi?id=20049
--- Comment #19 from Paul Vriens Paul.Vriens.Wine@gmail.com 2009-09-15 13:36:53 --- (In reply to comment #17)
Hi, passing to help and say the patch fixes the problem, tested under 1.1.28 and 29, but it left me thinking. Why the strlen function would not count the last charecter? It looks like a hack to add 1 =)
Adding the 1 is definitely not a hack. lstrlenW returns the length of the string without the terminating null character. CDM_GETFOLDERPATH on the other hand should report the length including that character.
The patch I've sent to wine-patches:
http://www.winehq.org/pipermail/wine-patches/2009-September/078516.html
includes a test and a fix.
http://bugs.winehq.org/show_bug.cgi?id=20049
--- Comment #20 from Bruno Jesus myxfce@gmail.com 2009-09-15 13:46:42 --- I see, thanks for the clarification. That was why I thought it's weird to return +1, looks like this is used on several differente places around the wine source code.
http://bugs.winehq.org/show_bug.cgi?id=20049
--- Comment #21 from Paul Vriens Paul.Vriens.Wine@gmail.com 2009-09-16 03:15:48 --- Can somebody change the component to comdlg32?
http://bugs.winehq.org/show_bug.cgi?id=20049
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|-unknown |comdlg32
http://bugs.winehq.org/show_bug.cgi?id=20049
CortelliStefano studioragcortelli@tiscali.it changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|comdlg32 |-unknown
--- Comment #22 from CortelliStefano studioragcortelli@tiscali.it 2009-09-16 04:03:12 --- Thank you for your replies and for your help. I have installed the patch und it seems all ok, the path is correct with my program either with SaveDialog or with OpenDialog. Now I try with Lazarus, bit IO think, that is ok.
Thank you very much again!
Best regards,
Stefano
(Preferred languages: Italiano, Français, Deutsch)
http://bugs.winehq.org/show_bug.cgi?id=20049
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|-unknown |comdlg32
--- Comment #23 from Nikolay Sivov bunglehead@gmail.com 2009-09-16 04:09:21 --- Hi, Stefano.
Don't change component field please.
http://bugs.winehq.org/show_bug.cgi?id=20049
--- Comment #24 from Nikolay Sivov bunglehead@gmail.com 2009-09-16 16:22:14 --- Fixed by commit:
http://source.winehq.org/git/wine.git/?a=commit;h=e997909ba7796c169fc79f91ef...
http://bugs.winehq.org/show_bug.cgi?id=20049
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |bunglehead@gmail.com Resolution| |FIXED
--- Comment #25 from Nikolay Sivov bunglehead@gmail.com 2009-09-16 16:23:22 --- Fixed.
http://bugs.winehq.org/show_bug.cgi?id=20049
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #26 from Alexandre Julliard julliard@winehq.org 2009-09-25 12:26:19 --- Closing bugs fixed in 1.1.30.