| 120 | } |
| 121 | |
| 122 | bool createdir(const char *path) |
| 123 | { |
| 124 | size_t len = strlen(path); |
| 125 | if(path[len-1]==PATHDIV) |
| 126 | { |
| 127 | static string strip; |
| 128 | memcpy(strip, path, len); |
| 129 | strip[len - 1] = '\0'; |
| 130 | path = strip; |
| 131 | } |
| 132 | #ifdef WIN32 |
| 133 | return CreateDirectory(path, NULL)!=0; |
| 134 | #else |
| 135 | return mkdir(path, 0777)==0; |
| 136 | #endif |
| 137 | } |
| 138 | |
| 139 | size_t fixpackagedir(char *dir) |
| 140 | { |
no outgoing calls
no test coverage detected