ICU-426 udata_create changed so that if output dir is NULL, creates output file in current directory. Before, it used to open output file in $ICU_DATA dir.
X-SVN-Rev: 1573
This commit is contained in:
parent
5399dc4eea
commit
7a7ab66a6b
@ -53,17 +53,14 @@ udata_create(const char *dir, const char *type, const char *name,
|
||||
}
|
||||
|
||||
/* open the output file */
|
||||
if(dir==NULL) {
|
||||
dir=u_getDataDirectory();
|
||||
}
|
||||
if(dir!=NULL && *dir!=0) {
|
||||
if(dir!=NULL && *dir!=0) { /* if dir has a value, we prepend it to the filename */
|
||||
char *p=filename+strlen(dir);
|
||||
uprv_strcpy(filename, dir);
|
||||
if (*(p-1)!=U_FILE_SEP_CHAR) {
|
||||
*p++=U_FILE_SEP_CHAR;
|
||||
*p=0;
|
||||
}
|
||||
} else {
|
||||
} else { /* otherwise, we'll output to the current dir */
|
||||
filename[0]=0;
|
||||
}
|
||||
uprv_strcat(filename, name);
|
||||
|
Loading…
Reference in New Issue
Block a user