Escape reserved characters when converting paths to urls

* Introduce and use BUrl::BUrl(const BPath&)
* The path is url-encoded, and the protocol is set to "file"

Fixes #10964.
This commit is contained in:
Adrien Destugues
2014-06-25 10:45:03 +02:00
parent 6bcbdcc3c0
commit 158ae74373
4 changed files with 28 additions and 4 deletions
+2
View File
@@ -8,6 +8,7 @@
#include <Archivable.h>
#include <Message.h>
#include <Path.h>
#include <String.h>
@@ -17,6 +18,7 @@ public:
BUrl(BMessage* archive);
BUrl(const BUrl& other);
BUrl(const BUrl& base, const BString& relative);
BUrl(const BPath& path);
BUrl();
virtual ~BUrl();