From ae06020b9f7eb7193652fab92ab0bee210e3d18c Mon Sep 17 00:00:00 2001 From: CaS Date: Fri, 27 Jan 2006 10:31:06 +0000 Subject: [PATCH] Minor debug improvment git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@22370 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 4 ++++ Source/NSDistributedLock.m | 14 ++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/ChangeLog b/ChangeLog index 49b06abb0..6aff6ce99 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2006-01-27 Richard Frith-Macdonald + + * Source/NSDistributedLock.m: ([description]) implemented + 2006-01-20 Richard Frith-Macdonald * Source/NSAutoreleasePool.m: ([addObject:]) fix error in check for diff --git a/Source/NSDistributedLock.m b/Source/NSDistributedLock.m index f9ce09b6b..004f2647a 100644 --- a/Source/NSDistributedLock.m +++ b/Source/NSDistributedLock.m @@ -96,6 +96,20 @@ static NSFileManager *mgr = nil; [super dealloc]; } +- (NSString*) description +{ + if (_lockTime == nil) + { + return [[super description] stringByAppendingFormat: + @" path '%@' not locked", _lockPath]; + } + else + { + return [[super description] stringByAppendingFormat: + @" path '%@' locked at %@", _lockPath, _lockTime]; + } +} + /** * Initialises the receiver with the specified filesystem path.
* The location in the filesystem must be accessible for this