- if (!strcasecmp(filename, "_roompic_")) {
- assoc_file_name(pathname, sizeof pathname, &CC->room, ctdl_image_dir);
- }
- else {
- for (a = 0; !IsEmptyStr(&filename[a]); ++a) {
- filename[a] = tolower(filename[a]);
- if ( (filename[a] == '/') || (filename[a] == '\\') ) {
- filename[a] = '_';
- }
- }
- if (strstr(filename, "../") != NULL)
- {
- cprintf("%d syntax error.\n",
- ERROR + ILLEGAL_VALUE);
- return;
- }
-
- snprintf(pathname, sizeof pathname,
- "%s/%s",
- ctdl_image_dir,
- filename);
- }
-