~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to client/drizzleimport.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:
422
422
  
423
423
  std::string user_config_dir((getenv("XDG_CONFIG_HOME")? getenv("XDG_CONFIG_HOME"):"~/.config"));
424
424
 
 
425
  if (user_config_dir.compare(0, 2, "~/") == 0)
 
426
  {
 
427
    char *homedir;
 
428
    homedir= getenv("HOME");
 
429
    if (homedir != NULL)
 
430
      user_config_dir.replace(0, 1, homedir);
 
431
  }
 
432
 
425
433
  po::variables_map vm;
426
434
 
427
435
  // Disable allow_guessing