On Thursday, June 26, 2003, at 10:14 AM, Fred Kiefer wrote:


While playing around with thumbnails (thanks to Charles Philip Chan for the link!) I came up with the following code:

  file = @"~/GNUstep/Images/TextSystem1.png";
  absolute = [file stringByStandardizingPath];
  NSLog(@"file: %@, absolute: %@", file, absolute);
  absolute = [[NSURL fileURLWithPath: absolute] relativeString];
  digest = [[[[absolute dataUsingEncoding: NSASCIIStringEncoding]
                 md5Digest] hexadecimalRepresentation] lowercaseString];

  NSLog(@"file: %@, absolute: %@, digest %@", file, absolute, digest);
  file = [[[@"~" stringByAppendingPathComponent: @".thumbnails"]
              stringByAppendingPathComponent: @"normal"]
             stringByAppendingPathComponent:
                 [digest stringByAppendingPathExtension: @"png"]];

image = [[NSImage alloc] initByReferencingFile: file];

But this does not give the correct result. According to the specification the URL file name "absolute" should be something like
file:///home/fred/GNUstep/Images/TextSystem1.png


but in GNUStep I do get:
file:/home/fred/GNUstep/Images/TextSystem1.png



I think GNUstep is wrong, according to RFC 1808.




_______________________________________________
Bug-gnustep mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-gnustep

Reply via email to