Author Topic: Problem if VSLICKCONFIG contains space characters  (Read 7693 times)

gregos_b

  • Community Member
  • Posts: 53
  • Hero Points: 0
Problem if VSLICKCONFIG contains space characters
« 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,

jimlangrunner

  • Senior Community Member
  • Posts: 360
  • Hero Points: 31
  • Jim Lang - always a student.
Re: Problem if VSLICKCONFIG contains space characters
« Reply #1 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.


hs2

  • Senior Community Member
  • Posts: 2761
  • Hero Points: 292
Re: Problem if VSLICKCONFIG contains space characters
« Reply #2 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

kenkahn

  • Community Member
  • Posts: 33
  • Hero Points: 1
Re: Problem if VSLICKCONFIG contains space characters
« Reply #3 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.
« Last Edit: July 01, 2008, 01:29:57 PM by kenkahn »

gregos_b

  • Community Member
  • Posts: 53
  • Hero Points: 0
Re: Problem if VSLICKCONFIG contains space characters
« Reply #4 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.

jimlangrunner

  • Senior Community Member
  • Posts: 360
  • Hero Points: 31
  • Jim Lang - always a student.
Re: Problem if VSLICKCONFIG contains space characters
« Reply #5 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.

gregos_b

  • Community Member
  • Posts: 53
  • Hero Points: 0
Re: Problem if VSLICKCONFIG contains space characters
« Reply #6 on: July 01, 2008, 03:19:24 PM »
I have tried the following line but without success...

jimlangrunner

  • Senior Community Member
  • Posts: 360
  • Hero Points: 31
  • Jim Lang - always a student.
Re: Problem if VSLICKCONFIG contains space characters
« Reply #7 on: July 01, 2008, 03:26:38 PM »
I'm sorry.  I'm afraid that's beyond me.

Jim.

MartyL

  • Senior Community Member
  • Posts: 166
  • Hero Points: 29
  • Synergex
Re: Problem if VSLICKCONFIG contains space characters
« Reply #8 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.

gregos_b

  • Community Member
  • Posts: 53
  • Hero Points: 0
BUG: Problem if VSLICKCONFIG contains space characters
« Reply #9 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.
« Last Edit: July 02, 2008, 11:11:13 AM by gregos_b »

ScottW, VP of Dev

  • Senior Community Member
  • Posts: 1471
  • Hero Points: 64
Re: Problem if VSLICKCONFIG contains space characters
« Reply #10 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.

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2896
  • Hero Points: 153
Re: Problem if VSLICKCONFIG contains space characters
« Reply #11 on: July 03, 2008, 01:15:49 PM »
A hotfix for this item has been posted on our website

gregos_b

  • Community Member
  • Posts: 53
  • Hero Points: 0
Re: Problem if VSLICKCONFIG contains space characters
« Reply #12 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 ?

ScottW, VP of Dev

  • Senior Community Member
  • Posts: 1471
  • Hero Points: 64
Re: Problem if VSLICKCONFIG contains space characters
« Reply #13 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.

hs2

  • Senior Community Member
  • Posts: 2761
  • Hero Points: 292
Re: Problem if VSLICKCONFIG contains space characters
« Reply #14 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