handle drives(os2)

This commit is contained in:
Asbjørn Pettersen 1999-08-06 11:14:01 +00:00
parent 933b866166
commit fc81fbd409
6 changed files with 45 additions and 5 deletions

View File

@ -1,3 +1,11 @@
Fri Aug 6 13:07:58 1999 ape@gandalf.spacetec.no (Asbjorn Pettersen)
* libgimp/gimpenv.c (gimp_directory): set gimp_directory
to GIMPDIR if it isn't defined (for OS/2 only).
* app/datafiles.c (datafiles_read_directories): Handle drives in
directory paths. For OS/2.
1999-08-05 Tor Lillqvist <tml@iki.fi>
* app/appenv.h: Define ROUND(), RINT(), SQR(), G_PI and

View File

@ -80,7 +80,15 @@ datafiles_read_directories (char *path_str,
*/
home = g_get_home_dir ();
local_path = g_strdup (path_str);
#ifdef __EMX__
/*
* Change drive so opendir works.
*/
if (local_path[1] == ':')
{
_chdrive(local_path[0]);
}
#endif
/* Search through all directories in the local path */
next_token = local_path;

View File

@ -80,7 +80,15 @@ datafiles_read_directories (char *path_str,
*/
home = g_get_home_dir ();
local_path = g_strdup (path_str);
#ifdef __EMX__
/*
* Change drive so opendir works.
*/
if (local_path[1] == ':')
{
_chdrive(local_path[0]);
}
#endif
/* Search through all directories in the local path */
next_token = local_path;

View File

@ -71,7 +71,11 @@ gimp_directory ()
}
else
{
if (NULL != home_dir)
#ifdef __EMX__
gimp_dir = g_strdup(__XOS2RedirRoot(GIMPDIR));
return gimp_dir;
#endif
if (NULL != home_dir)
{
gimp_dir = g_strconcat (home_dir, G_DIR_SEPARATOR_S,
GIMPDIR, NULL);

View File

@ -80,7 +80,15 @@ datafiles_read_directories (char *path_str,
*/
home = g_get_home_dir ();
local_path = g_strdup (path_str);
#ifdef __EMX__
/*
* Change drive so opendir works.
*/
if (local_path[1] == ':')
{
_chdrive(local_path[0]);
}
#endif
/* Search through all directories in the local path */
next_token = local_path;

View File

@ -71,7 +71,11 @@ gimp_directory ()
}
else
{
if (NULL != home_dir)
#ifdef __EMX__
gimp_dir = g_strdup(__XOS2RedirRoot(GIMPDIR));
return gimp_dir;
#endif
if (NULL != home_dir)
{
gimp_dir = g_strconcat (home_dir, G_DIR_SEPARATOR_S,
GIMPDIR, NULL);