SlickEdit Community

SlickEdit Product Discussion => SlickEdit® => Topic started by: gregos_b on July 01, 2008, 12:31:49 pm

Title: Problem if VSLICKCONFIG contains space characters
Post by: gregos_b on July 01, 2008, 12:31:49 pm
I use the environment variable VSLICKCONFIG in a command (to setup source control). The problem is that
VSLICKCONFIG  = C:\Documents and Settings\gb01415\My Documents\My SlickEdit Config\12.0.1

and when the command executes, SE only take care about "C:\Documents" and ignore the following.
How can I manage this ?

Best regards,
Title: Re: Problem if VSLICKCONFIG contains space characters
Post by: jimlangrunner on July 01, 2008, 12:52:36 pm
Off the top of my head, wrapping the path in quotes:
VSLICKCONFIG  = "C:\Documents and Settings\gb01415\My Documents\My SlickEdit Config\12.0.1"
should do it.  Could be wrong.

Jim.

Title: Re: Problem if VSLICKCONFIG contains space characters
Post by: hs2 on July 01, 2008, 12:54:19 pm
It's right, Jim :)
@gregos_b: There is a _str maybe_quote_filename(_str filename); macro function available in case you're using it in a Slick-C macro command.
Good luck, HS2
Title: Re: Problem if VSLICKCONFIG contains space characters
Post by: kenkahn on July 01, 2008, 01:27:33 pm
You can also use the directory short names:

  VSLICKCONFIG  = C:\Docume~1\gb01415\MyDocu~1\MySlic~1\12.0.1

To find short names use the "dir /x" command.
Title: Re: Problem if VSLICKCONFIG contains space characters
Post by: gregos_b on July 01, 2008, 02:07:04 pm
Thank you for your responses,

I have tried with quotes but it's not better. The picture shows where I use it.
Title: Re: Problem if VSLICKCONFIG contains space characters
Post by: jimlangrunner on July 01, 2008, 02:17:21 pm
@gregos_b, how about:
Code: [Select]
%"(VSLICKCONFIG)\SlickeditCM2.exe" /x ......or possibly:
Code: [Select]
"%(VSLICKCONFIG)\SlickeditCM2.exe" /x ......because the environment variable should be expanded to it's full value, you don't have quotes, so you'll wind up with the undesired spaces. 

Jim.
Title: Re: Problem if VSLICKCONFIG contains space characters
Post by: gregos_b on July 01, 2008, 03:19:24 pm
I have tried the following line but without success...
Title: Re: Problem if VSLICKCONFIG contains space characters
Post by: jimlangrunner on July 01, 2008, 03:26:38 pm
I'm sorry.  I'm afraid that's beyond me.

Jim.
Title: Re: Problem if VSLICKCONFIG contains space characters
Post by: MartyL on July 01, 2008, 04:22:11 pm
That line looks correct as far as formatting goes.

Are you positive that the VSLICKCONFIG directory is where this SlickEditCM2.exe application is? Are the parameters for the application formatted correctly? I would test to see if it's even a path issue by putting the application in a static location like "C:\test\SlickEditCM2.exe" just to make sure that you have the tool configured correctly, then move on to placing it in your VSLICKCONFIG directory.
Title: BUG: Problem if VSLICKCONFIG contains space characters
Post by: gregos_b on July 02, 2008, 07:45:09 am
If I move my program to "C:\test\SlickEditCM2.exe" everything is OK. The problem is really VSLICKCONFIG whith space characters.
It always return :

'C:\Documents' is not recognized as an internal or external command,
operable program or batch file.

I don't understand, I have set "echo" behind the command line and the result is OK:

"C:\Documents and Settings\gb01415\My Documents\My SlickEdit Config\12.0.1\SlickEditCM.exe" W:\continuus\gb01415\gb01415E428V3.3\snPrm\libSEPApi\test\Main.cc "properties -g"

It seems to be a bug in SE execution command.
Title: Re: Problem if VSLICKCONFIG contains space characters
Post by: ScottW, VP of Dev on July 02, 2008, 03:50:03 pm
We have confirmed that this is a bug. We are working on a hotifix to address it.
Title: Re: Problem if VSLICKCONFIG contains space characters
Post by: Dan on July 03, 2008, 01:15:49 pm
A hotfix for this item has been posted on our website
Title: Re: Problem if VSLICKCONFIG contains space characters
Post by: gregos_b on July 03, 2008, 03:30:12 pm
Ok but I'm using SlickEdit 2007 (v12.0.3), do I have to update to 2008 first ?
Title: Re: Problem if VSLICKCONFIG contains space characters
Post by: ScottW, VP of Dev on July 03, 2008, 07:22:46 pm
We don't release hotfixes for previous releases.

Often, you can take the modified .e file and diff it against the currently shipping .e file to isolate the change. Then make the same change to the previous version's .e file. You may find someone on the forums who is willing to assist you with that. Of course, this may not always work and any such change is unsupported.
Title: Re: Problem if VSLICKCONFIG contains space characters
Post by: hs2 on July 03, 2008, 11:08:49 pm
@gregos_b: Just in case you're still lost I've 'backported' the vc.e hotfix to SE v12.0.3 r35:
vc.e - _vcshell2() [line 2073]:
Code: [Select]
static _vcshell2(_str vcs,_str command,_str styles,_str buf_name,
                 var lastss_cd,_str vcsproject,_str ssnew_archives='',
                 _str ShellOptions='')
{
   _str program="", arg_list="";
   if (pos('error_redir',styles,1,'i')) {
      // HS2-CHG: backport from v13.0.1 hotfix r10 #1
      // parse command with program arg_list;
      program = parse_file(command);
      arg_list = command;
      command=program' >'_vcerror_file()' 2>&1 'arg_list;
   } else if (pos('error_stdout',styles,1,'i')) {
      // HS2-CHG: backport from v13.0.1 hotfix r10 #2
      // parse command with program arg_list;
      program = parse_file(command);
      arg_list = command;
      command=program' >'_vcerror_file()' 'arg_list;
   }

Note the the '#2' wasn't contained in the original hotfix, but I thought it also applies to this code path.

HS2