Home » U++ Library support » U++ SQL » IMHO strange Files for SQL Schema
IMHO strange Files for SQL Schema [message #6091] |
Mon, 30 October 2006 10:16  |
fallingdutch
Messages: 258 Registered: July 2006
|
Experienced Member |
|
|
SqlSchema uses imho strange files when used with linux (posix systems):
String SqlSchema::NormalFileName(int i, const char *dir, const char *name) const {
[...]
if(dir)
p = dir;
else
#ifdef PLATFORM_WIN32
p=GetFileDirectory(GetExeFilePath());
#endif
#ifdef PLATFORM_POSIX
p=GetHomeDirectory();
#endif
[...]
return AppendFileName(p,pfx[i]+n);
}
in case you have two apps with the same database schema only one will be created!
so I would prefer in both cases (windows and posix)
a "return ConfigFile(pfx[i]+n);" and no platformdependent code at all:
String SqlSchema::NormalFileName(int i, const char *dir, const char *name) const {
[...]
/*
if(dir)
p=dir
else
#ifdef PLATFORM_WIN32
p=GetFileDirectory(GetExeFilePath());
#endif
#ifdef PLATFORM_POSIX
p=GetHomeDirectory();
#endif
*/
[...]
if(dir)
return AppendFileName(dir,pfx[i]+n);
else
return ConfigFile(pfx[i+n]);
}
Bas
|
|
|
Goto Forum:
Current Time: Tue Apr 29 00:36:01 CEST 2025
Total time taken to generate the page: 0.02632 seconds
|