summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1999-08-19 18:04:16 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1999-08-19 18:04:16 +0000
commita124054f11272da65ab027050bf886cdd46873ae (patch)
treef6bedb561560b8070d1a745ba7c6b6aad0858b39
parent3f64aeffc6646a66d81b615f892e3906f158f012 (diff)
downloadATCD-a124054f11272da65ab027050bf886cdd46873ae.tar.gz
ChangeLogTag:Thu Aug 19 13:03:07 1999 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu>
-rw-r--r--ChangeLog-99b6
-rw-r--r--ace/ACE.cpp7
-rw-r--r--ace/ACE.h5
3 files changed, 11 insertions, 7 deletions
diff --git a/ChangeLog-99b b/ChangeLog-99b
index ec3eb472146..f248ad051be 100644
--- a/ChangeLog-99b
+++ b/ChangeLog-99b
@@ -1,3 +1,9 @@
+Thu Aug 19 13:03:07 1999 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu>
+
+ * ace/ACE.cpp: Fixed a bug in ACE::dirname() that was causing problems
+ if the pathname didn't have a delim character. Thanks to Russ
+ Noseworthy for reporting this and providing a fix.
+
Thu Aug 19 12:59:56 1999 Carlos O'Ryan <coryan@cs.wustl.edu>
* ace/Message_Block.i:
diff --git a/ace/ACE.cpp b/ace/ACE.cpp
index bb354e25ef8..83a44988050 100644
--- a/ace/ACE.cpp
+++ b/ace/ACE.cpp
@@ -1032,11 +1032,8 @@ ACE::dirname (const char *pathname, char delim)
if (temp == 0)
{
- if (ACE_OS::strcmp (pathname, ".") == 0
- || ACE_OS::strcmp (pathname, "..") == 0)
- return_dirname[0] = '.';
- else
- return_dirname[0] = delim;
+ return_dirname[0] = '.';
+ return_dirname[1] = '\0';
return return_dirname;
}
diff --git a/ace/ACE.h b/ace/ACE.h
index f28e1f6745f..e291bceca8a 100644
--- a/ace/ACE.h
+++ b/ace/ACE.h
@@ -506,8 +506,9 @@ public:
static const char *dirname (const char *pathname,
char delim = ACE_DIRECTORY_SEPARATOR_CHAR_A);
// Returns the "dirname" of a <pathname>. For instance, the
- // basename of "/tmp/foo.cpp" is "/tmp" when <delim> is '/'. This
- // method does not modify <pathname> and is not reentrant.
+ // basename of "/tmp/foo.cpp" is "/tmp" when <delim> is '/'. If
+ // <pathname> has no <delim> ".\0" is returned. This method does
+ // not modify <pathname> and is not reentrant.
#if defined (ACE_HAS_UNICODE)
// A collection of wide string functions. See above for details.