| 58 |
|
#include "boost/date_time/date_parsing.hpp" |
| 59 |
|
#include "boost/date_time/posix_time/posix_time.hpp" |
| 60 |
|
|
| 61 |
+ |
string escapePath(string input) { |
| 62 |
+ |
|
| 63 |
+ |
string output; |
| 64 |
+ |
string escape_me = "& ;()|<>\"'\\#*?$"; |
| 65 |
+ |
for(int i = 0; i < input.size(); i++) { |
| 66 |
+ |
for(int j = 0; j < escape_me.size(); j++) if (input[i] == escape_me[j]) output += '//'; |
| 67 |
+ |
output += input[i]; |
| 68 |
+ |
} |
| 69 |
+ |
return output; |
| 70 |
+ |
} |
| 71 |
+ |
|
| 72 |
|
int globalizeData(void) |
| 73 |
|
{ |
| 74 |
|
busy = 1; |
| 349 |
|
// or we could just include it in the zip in the proper place already. |
| 350 |
|
|
| 351 |
|
copy("../../persist.dat","../persist.dat"); |
| 352 |
< |
copy("../../keyconfig.txt","../keyconfig.txt"); |
| 352 |
> |
copy("../../keyconfig.txt","../keyconfig.txt"); |
| 353 |
|
#ifndef WIN32 |
| 354 |
|
/* On Mac only, set the current GDF to the AE GDF by writing to Oni's global preferences file (thankfully a standard OS X ".plist" XML file). |
| 355 |
|
If there are no Oni prefs (only possible if Oni has not been run even once), then the above line will fail silently, no harm done, |