[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
-[NSData writeToFile:atomically:] Bug introduced in 1.5.0
From: |
Roland Schwingel |
Subject: |
-[NSData writeToFile:atomically:] Bug introduced in 1.5.0 |
Date: |
Mon, 16 Sep 2002 14:38:14 +0200 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1) Gecko/20020826 |
Hi....
Im am still migrating sources... And I found I bug which was
(when diffing with base-1.4.0) introduced in base-1.5.0.
On Windows NSDatas -writeToFile:<path> atomically:YES is no longer working.
After creating the file it tries to rename() new File to old File. But
it can't because
old file is still present....
If you go to line 907: you will find this:
if ([mgr fileExistsAtPath: path])
{
att = [[mgr fileAttributesAtPath: path
traverseLink: YES] mutableCopy];
IF_NO_GC(TEST_AUTORELEASE(att));
}
In 1.4.0 the source looked like this:
if ([mgr fileExistsAtPath: path])
{
att = [[mgr fileAttributesAtPath: path
traverseLink: YES] mutableCopy];
IF_NO_GC(TEST_AUTORELEASE(att));
[mgr removeFileAtPath: path handler: nil];
}
mgr is declared previously. And indeed with 1.5.0 I am getting an
errormessage regarding this problem to be
not able to rename the file.
Greetings,
Roland
- -[NSData writeToFile:atomically:] Bug introduced in 1.5.0,
Roland Schwingel <=