~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to client/drizzleslap.cc

  • Committer: Andrew Hutchings
  • Date: 2010-11-11 16:51:37 UTC
  • mto: (1927.1.1 build)
  • mto: This revision was merged to the branch mainline in revision 1928.
  • Revision ID: andrew@linuxjedi.co.uk-20101111165137-e5jxsy5x37kh8shq
Using '~' to represent home is a shell standard, POSIX functions do not understand it.  So for home config file loading substitute it for env variable $HOME if possible (also a POSIX standard)

Show diffs side-by-side

added added

removed removed

Lines of Context:
549
549
 
550
550
    std::string user_config_dir((getenv("XDG_CONFIG_HOME")? getenv("XDG_CONFIG_HOME"):"~/.config"));
551
551
 
 
552
    if (user_config_dir.compare(0, 2, "~/") == 0)
 
553
    {
 
554
      char *homedir;
 
555
      homedir= getenv("HOME");
 
556
      if (homedir != NULL)
 
557
        user_config_dir.replace(0, 1, homedir);
 
558
    }
 
559
 
552
560
    uint64_t temp_drizzle_port= 0;
553
561
    drizzle_con_st con;
554
562
    OptionString *eptr;