[GRASS-dev] Re: [GRASS GIS] #629: WinGRASS: spaces in pathnames

GRASS GIS trac at osgeo.org
Sat Oct 10 05:54:19 EDT 2009

#629: WinGRASS: spaces in pathnames
  Reporter:  hamish        |       Owner:  grass-dev at lists.osgeo.org
      Type:  defect        |      Status:  new                      
  Priority:  normal        |   Milestone:  6.4.0                    
 Component:  Installation  |     Version:  6.4.0 RCs                
Resolution:                |    Keywords:  wingrass, msys           
  Platform:  MSWindows XP  |         Cpu:  x86-32                   
Comment (by glynn):

 Replying to [comment:28 hamish]:

 > ok, it looks like the extra \" may be to blame then. (if _spawnl()
 quotes the argument [as it should] then you get ""...\dbf.exe"")

 [http://msdn.microsoft.com/en-us/library/20y988d2(VS.80).aspx Microsoft's
 documentation] says that the caller needs to quote arguments:

 > Spaces embedded in strings may cause unexpected behavior; for example,
 passing _spawn the string "hi there" will result in the new process
 getting two arguments, "hi" and "there". If the intent was to have the new
 process open a file named "hi there", the process would fail. You can
 avoid this by quoting the string: "\"hi there\"".

 '''However:''' it says "arguments", which doesn't necessarily apply to the
 command name (and db_start_driver() invokes the driver with no arguments),
 although it will apply to argv![0] (it shouldn't matter if argv![0] has
 excess quotes, but if it doesn't have enough it will end up rolling over
 into argv![1]).

Ticket URL: <https://trac.osgeo.org/grass/ticket/629#comment:30>
GRASS GIS <http://grass.osgeo.org>

More information about the grass-dev mailing list