filesystem and filenames containing "+"
Dear all,
I am experiencing problems with boost::filesystem on files that contains
a plus (+) sign. Below is a minimal example to test this. the line:
boost::filesystem::path p_plus("filename+.txt");
throws an exception if the filename contains a plus.
Any help or hints would be greatly appreciated.
Best regards,
Simon
output:
*****************
Contents of filename-.txt
Filesystem error caught, reason: boost::filesystem::path: invalid name
"filename+.txt" in path: "filename+.txt"
*****************
source:
*************
#include <iostream>
#include <cstdlib>
#include
On Mon, 3 Apr 2006, Simon Lundell wrote:
Dear all,
I am experiencing problems with boost::filesystem on files that contains a plus (+) sign. Below is a minimal example to test this. the line:
boost::filesystem::path p_plus("filename+.txt");
throws an exception if the filename contains a plus.
Any help or hints would be greatly appreciated.
You need to change the name checker. Try this: boost::filesystem::path p_plus("filename+.txt", & boost::filesystem::no_check ); or maybe boost::filesystem::path p_plus("filename+.txt", & boost::filesystem::native ); -- François Duranleau LIGUM, Université de Montréal
participants (2)
-
François Duranleau
-
Simon Lundell