FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Bug: bud doesn't correctly handle paths with spaces

 
Post new topic   Reply to topic     Forum Index -> Build
View previous topic :: View next topic  
Author Message
lio



Joined: 28 Apr 2006
Posts: 10
Location: Beijing

PostPosted: Fri Jan 19, 2007 10:43 am    Post subject: Bug: bud doesn't correctly handle paths with spaces Reply with quote

Classic problem:
Code:
C:\dmd\dwt\import>bud_win_3.04 -lib all.d
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.


I suspected something so I've placed the following C program as Program.exe in the root:
Code:
// Compile with: cl Program.c /link /ENTRY:main

#pragma comment(lib,"user32.lib")
#pragma comment(lib,"kernel32.lib")

int __stdcall MessageBoxW( void*, short*, short*, int );
short* __stdcall GetCommandLineW(void);

int main(void)
{
    return MessageBoxW( 0, GetCommandLineW(), L"Error", 0 );
}

Resulting in:
Code:
---------------------------
Error
---------------------------
C:\Program  Files (x86)\Microsoft Visual Studio 8\VC\BIN\lib.exe @C:\dmd\dwt\lib\dwtextra.lsp
---------------------------
OK   
---------------------------

Code:
C:\dmd\dwt\import>where lib
C:\Program Files (x86)\Microsoft Visual Studio 8\VC\bin\lib.exe
c:\dm\bin\lib.exe

I've fixed it by changing util/fileex.d, line 355, from:
Code:
    return RunCommand(pExeName ~ " " ~ pCommand);

to:
Code:
    return RunCommand(`"` ~ pExeName ~ `" ` ~ pCommand);
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Build All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group