On 10/1/2010 6:14 PM, Galen Seitz wrote:
> logical american wrote:
>>    Quick question:
>>
>> I am trying to use the mkdir() command from sys/stat.h library, but it
>> is blowing up when the directory name has some type of character in it,
>> such as a space character or hyphen.
>>
>> What is the command to fix this?  Is activating UTF-8 characters what is
>> needed?  I am using the C++.c_str() to supply the directory name, should
>> I use some IOMANIP function to fix this?
>>
>> http://www.opengroup.org/onlinepubs/009695399/functions/mkdir.html
>> doesn't have anything on this, but I do get the ENOENT error.
> What arguments are you passing to mkdir()?  Do all elements of the
> path leading up to the new directory name exist?  The following
> program works for me.
>
>
> #include<sys/stat.h>
> #include<sys/types.h>
>
> main()
> {
>           mkdir("/tmp/foo bar-baz", 0777);
> }
>
I just now created the whole correct destination directories, and yet 
the command still fails.

This points that the string.c_str() function is NOT passing the correct 
characters to the mkdir() function, as there is NOT a problem with the 
actual existence of the directories.

_______________________________________________
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug

Reply via email to