This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

cygwin_conv_to_posix_path()


Greets. I've been experiencing trouble with the cygwin_conv_to_posix_path()
function when using it on argv[0]. Whenever there's a space in one of the
filenames in the full path, the entire path is surrounded in double quotes.
The cygwin function does not recognize these quotes, nor does it remove them,
Nor does it covert it to a posix path. (cygpath also experiences the same
behavior). Can this behavior be changed for the conversion functions to also
convert full path including double quotes for things like argv[0], so people
like me can make porting as easily as possible.. for example, my code is:

Before:
  execv(argv[0], argv);

After:
  char buf[512];
  cygwin_conv_to_posix_path(argv[0], buf);
  execv(buf, argv);
  perror(buf);

This prints:
"C:/Program Files/cygnus/cygwin-b20/program.exe": No such file or directory

Because it can't convert the filename inside double-quotes.

Thank you!

---
Byron Stanoszek        <byron@math.uakron.edu>
System Administrator - University of Akron Applied Mathematics Dept.


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]