Apache OpenOffice (AOO) Bugzilla – Issue 35568
shell command can't handle spaces
Last modified: 2008-05-17 23:25:19 UTC
create a simple batch at 'c:\abc def' with: echo %1 %2 > c:\bug.txt call it with print shell("'c:\abc def\bug.sh'", 1, "dumy", true) -> result is 0 which indicates it was run successfull but the file c:\bug.txt doesn't exist in so7 this worked correct and the file bug.txt was created remove the space between c and d and run again -> result is still 0 in so7 an error was thrown, telling that the command wasn't found
AB->TBO: Sorry, but I connot reproduce this at all. I couldn't make your example print shell("'c:\abc def\bug.bat'", 1, "dumy", true) work anywhere. Both SO 8 / src680 m54 (no Basic changes have been done in m55/m56) and a SO7 PP0 always throw an error. I used bug.bat in Windows, because bug.sh did not work at all, also not in VB. Also VB6 (changing print to msgbox and leaving away the incompatible last two parameters) is not able to execute: MsgBox Shell("'C:\abc def\bug.bat' dummy") even if C:\abc def\bug.bat exist. But, assuming that "C:\abcdef\bug.bat" exist, MsgBox Shell("C:\abcdef\bug.bat dummy") is executed in the same way by SO 7, SO 8 and VB. Besides that the Shell command implementation hasn't been changed since SO 7. So if you still see a problem, please ask first if anything has changed in the vos OProcess class used by Basic to execute a shell command. But I doubt this.
Reassignment failed... Sorry, I didn't see your 7 PP3 reference and you're right, it really worked in 7 PP3, but only there, not before and not after. As the code is not even com- patible to VB I doubt that this is worth a OOo 2.0 target. And it's still true: The Shell implementation hasn't changed all the time. So only vos::OProcess may have been changed, but maybe this was a bug in PP3?
<grr> yes, in SO7 final it didn't work either. -> target moved to later. Typo in batch name, file extension has to be .bat instead of .sh. -> assigning to vos::OProcess owner
obr @ ab: vos::OProcess is deprecated since ages: please use osl::Process instead. BTW: just checked and the maintainer of osl::Process is TRA :-).
Started
Duplicate *** This issue has been marked as a duplicate of 18496 ***
The Issue you raised has been marked as 'Resolved' and not updated within the last 1 year+. I am therefore setting this issue to 'Verified' as the first step towards Closing it. If you feel this is incorrect, please re-open the issue and add any comments. Many thanks, Andrew Cleaning-up and Closing old Issues ~ The Grand Bug Squash, pre v3 ~ http://marketing.openoffice.org/3.0/announcementbeta.html
As per previous posting: Verified -> Closed. A Closed Issue is a Happy Issue (TM). Regards, Andrew