One more change to add back the .mag extension when writing the
file from the contents of def->cd_file.
This commit is contained in:
parent
276bf1d78a
commit
ae6b627df7
|
|
@ -2721,10 +2721,15 @@ DBCellWrite(cellDef, fileName)
|
||||||
/*
|
/*
|
||||||
* Figure out the name of the file we will eventually write.
|
* Figure out the name of the file we will eventually write.
|
||||||
*/
|
*/
|
||||||
if (fileName)
|
if (!fileName)
|
||||||
{
|
{
|
||||||
realname = (char *) mallocMagic(strlen(fileName) + strlen(DBSuffix) + 1);
|
if (cellDef->cd_file)
|
||||||
(void) sprintf(realname, "%s%s", fileName, DBSuffix);
|
fileName = cellDef->cd_file;
|
||||||
|
else if (cellDef->cd_name)
|
||||||
|
fileName = cellDef->cd_name;
|
||||||
|
else
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
/* Bug fix: 7/17/99, Michael D. Godfrey: Forces */
|
/* Bug fix: 7/17/99, Michael D. Godfrey: Forces */
|
||||||
/* cd_name and cd_file to ALWAYS be the same, otherwise ugly */
|
/* cd_name and cd_file to ALWAYS be the same, otherwise ugly */
|
||||||
|
|
@ -2732,18 +2737,9 @@ DBCellWrite(cellDef, fileName)
|
||||||
/* filename. */
|
/* filename. */
|
||||||
|
|
||||||
cellDef->cd_file = StrDup(&cellDef->cd_file, fileName);
|
cellDef->cd_file = StrDup(&cellDef->cd_file, fileName);
|
||||||
}
|
|
||||||
else if (cellDef->cd_file)
|
realname = (char *) mallocMagic(strlen(fileName) + strlen(DBSuffix) + 1);
|
||||||
{
|
(void) sprintf(realname, "%s%s", fileName, DBSuffix);
|
||||||
realname = StrDup((char **) NULL, cellDef->cd_file);
|
|
||||||
}
|
|
||||||
else if (cellDef->cd_name)
|
|
||||||
{
|
|
||||||
realname = (char *) mallocMagic((unsigned) (strlen(cellDef->cd_name)
|
|
||||||
+ strlen(DBSuffix) + 1));
|
|
||||||
(void) sprintf(realname, "%s%s", cellDef->cd_name, DBSuffix);
|
|
||||||
}
|
|
||||||
else return (FALSE);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Expand the filename, removing the leading ~, if any.
|
* Expand the filename, removing the leading ~, if any.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue