[OGo-Developer] userDefaults
Rafel Amer
developer@opengroupware.org
Tue, 23 Jan 2007 12:45:49 +0100
Hi!
We are running OGo and different persons log in with the
same username. Some times OGo crashes with the following
message:
class: LSDBObjectCommandException
name: LSDBObjectCommandException
reason: userdefaults::delete failed: Could not write User-Defaults
I think the crash occurs when different OGo sessions tries to write to disk
the same userDefaults file.
The line 254 of the file SOPE-4.4/libFoundation/Foundation/common.m is
filename = atomically ? [path stringByAppendingString:@"~"] : path;
i.e., if the write is atomic a temporary file is used. The name of the
temporary file
is the name of the original file with "~" appended.
Do you thing that replacing this line with
filename = path;
if(atomically) {
NSProcessInfo *proc = [NSProcessInfo processInfo];
filename = [NSString stringWithFormat:@"%@%@.txt",
[path stringByDeletingLastPathComponent],
[proc globallyUniqueString]];
}
will solve the problem?
Thanks.
R. Amer
Thecnical University of Catalonia
}
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.