|
|
@ -74,7 +74,7 @@ TQString TQDir::homeDirPath()
|
|
|
|
TQString TQDir::canonicalPath() const
|
|
|
|
TQString TQDir::canonicalPath() const
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TQString r;
|
|
|
|
TQString r;
|
|
|
|
#if defined(__GLIBC__) && !defined(PATH_MAX)
|
|
|
|
#if !defined(PATH_MAX)
|
|
|
|
char *cur = ::get_current_dir_name();
|
|
|
|
char *cur = ::get_current_dir_name();
|
|
|
|
if ( cur ) {
|
|
|
|
if ( cur ) {
|
|
|
|
char *tmp = canonicalize_file_name( TQFile::encodeName( dPath ).data() );
|
|
|
|
char *tmp = canonicalize_file_name( TQFile::encodeName( dPath ).data() );
|
|
|
@ -103,7 +103,7 @@ TQString TQDir::canonicalPath() const
|
|
|
|
// FIXME
|
|
|
|
// FIXME
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif /* __GLIBC__ && !PATH_MAX */
|
|
|
|
#endif /* !PATH_MAX */
|
|
|
|
return r;
|
|
|
|
return r;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -165,7 +165,7 @@ TQString TQDir::currentDirPath()
|
|
|
|
|
|
|
|
|
|
|
|
struct stat st;
|
|
|
|
struct stat st;
|
|
|
|
if ( ::stat( ".", &st ) == 0 ) {
|
|
|
|
if ( ::stat( ".", &st ) == 0 ) {
|
|
|
|
#if defined(__GLIBC__) && !defined(PATH_MAX)
|
|
|
|
#if !defined(PATH_MAX)
|
|
|
|
char *currentName = ::get_current_dir_name();
|
|
|
|
char *currentName = ::get_current_dir_name();
|
|
|
|
if ( currentName ) {
|
|
|
|
if ( currentName ) {
|
|
|
|
result = TQFile::decodeName(currentName);
|
|
|
|
result = TQFile::decodeName(currentName);
|
|
|
@ -175,7 +175,7 @@ TQString TQDir::currentDirPath()
|
|
|
|
char currentName[PATH_MAX+1];
|
|
|
|
char currentName[PATH_MAX+1];
|
|
|
|
if ( ::getcwd( currentName, PATH_MAX ) )
|
|
|
|
if ( ::getcwd( currentName, PATH_MAX ) )
|
|
|
|
result = TQFile::decodeName(currentName);
|
|
|
|
result = TQFile::decodeName(currentName);
|
|
|
|
#endif /* __GLIBC__ && !PATH_MAX */
|
|
|
|
#endif /* !PATH_MAX */
|
|
|
|
#if defined(QT_DEBUG)
|
|
|
|
#if defined(QT_DEBUG)
|
|
|
|
if ( result.isNull() )
|
|
|
|
if ( result.isNull() )
|
|
|
|
tqWarning( "TQDir::currentDirPath: getcwd() failed" );
|
|
|
|
tqWarning( "TQDir::currentDirPath: getcwd() failed" );
|
|
|
|