Issue 35568 - shell command can't handle spaces
Summary: shell command can't handle spaces
Status: CLOSED DUPLICATE of issue 18496
Alias: None
Product: General
Classification: Code
Component: code (show other issues)
Version: 680m56
Hardware: All Windows XP
: P3 Trivial (vote)
Target Milestone: AOO Later
Assignee: ab
QA Contact: issues@framework
URL:
Keywords: oooqa
Depends on:
Blocks:
 
Reported: 2004-10-14 19:17 UTC by b.osi.ooo
Modified: 2008-05-17 23:25 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description b.osi.ooo 2004-10-14 19:17:26 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
Comment 1 ab 2004-10-15 09:01:13 UTC
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.
Comment 2 ab 2004-10-15 09:09:21 UTC
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?
Comment 3 b.osi.ooo 2004-10-19 11:03:18 UTC
<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
Comment 4 nospam4obr 2004-10-19 11:21:39 UTC
obr @ ab: vos::OProcess is deprecated since ages: please use osl::Process instead.

BTW: just checked and the maintainer of osl::Process is TRA :-).
Comment 5 ab 2005-04-06 16:37:20 UTC
Started
Comment 6 ab 2005-07-28 10:11:28 UTC
Duplicate


*** This issue has been marked as a duplicate of 18496 ***
Comment 7 ace_dent 2008-05-17 21:22:15 UTC
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
Comment 8 ace_dent 2008-05-17 23:25:19 UTC
As per previous posting: Verified -> Closed.
A Closed Issue is a Happy Issue (TM).

Regards,
Andrew