Changeset 60d7935 for logging.c


Ignore:
Timestamp:
Feb 23, 2011, 12:09:26 AM (10 years ago)
Author:
Anders Kaseorg <andersk@mit.edu>
Branches:
master, release-1.8, release-1.9
Children:
1137802
Parents:
5738650
git-author:
Anders Kaseorg <andersk@mit.edu> (02/12/11 00:50:27)
git-committer:
Anders Kaseorg <andersk@mit.edu> (02/23/11 00:09:26)
Message:
Use owl_util_makepath instead of faking ~ expansion by owl_text_substitute

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
File:
1 edited

Legend:

Unmodified
Added
Removed
  • logging.c

    r3472845 r60d7935  
    131131
    132132  /* expand ~ in path names */
    133   logpath = owl_text_substitute(owl_global_get_logpath(&g), "~", owl_global_get_homedir(&g));
     133  logpath = owl_util_makepath(owl_global_get_logpath(&g));
    134134
    135135  /* Figure out what path to log to */
     
    194194
    195195  /* expand ~ in path names */
    196   logpath = owl_text_substitute(owl_global_get_logpath(&g), "~", owl_global_get_homedir(&g));
     196  logpath = owl_util_makepath(owl_global_get_logpath(&g));
    197197
    198198  snprintf(filename, MAXPATHLEN, "%s/%s", logpath, tobuff);
     
    310310  /* create the filename (expanding ~ in path names) */
    311311  if (personal) {
    312     logpath = owl_text_substitute(owl_global_get_logpath(&g), "~", owl_global_get_homedir(&g));
     312    logpath = owl_util_makepath(owl_global_get_logpath(&g));
    313313    snprintf(filename, MAXPATHLEN, "%s/%s", logpath, from);
    314314    snprintf(allfilename, MAXPATHLEN, "%s/all", logpath);
     
    316316
    317317  } else {
    318     logpath = owl_text_substitute(owl_global_get_classlogpath(&g), "~", owl_global_get_homedir(&g));
     318    logpath = owl_util_makepath(owl_global_get_classlogpath(&g));
    319319    snprintf(filename, MAXPATHLEN, "%s/%s", logpath, from);
    320320  }
Note: See TracChangeset for help on using the changeset viewer.