mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
Use the documented key for the file path when calling the error handler
This commit is contained in:
parent
9f8c181ab5
commit
ddb68e1b29
2 changed files with 18 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
2025-04-15 Wolfgang Lux <wolfgang.lux@gmail.com>
|
||||
|
||||
* Source/NSFileManager.m: Use the documented key for the file path
|
||||
in the error dictionary passed to the error handler and continue
|
||||
setting the incorrect one as well for backward compatibility.
|
||||
|
||||
2025-04-08 Wolfgang Lux <wolfgang.lux@gmail.com>
|
||||
|
||||
* Source/NSOperation.m (_thread): Fix potential deadlock when
|
||||
|
|
|
@ -3627,8 +3627,14 @@ static inline void gsedRelease(GSEnumeratedDirectory X)
|
|||
if ([handler respondsToSelector:
|
||||
@selector (fileManager:shouldProceedAfterError:)])
|
||||
{
|
||||
/* wl 20250114: For a very long time, this method incorrectly was
|
||||
* using NSFilePathErrorKey instead of the documented key @"Path"
|
||||
* to report the affected path. For backward compatibility we keep
|
||||
* setting the wrong key below.
|
||||
*/
|
||||
NSDictionary *errorInfo = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
path, NSFilePathErrorKey,
|
||||
path, @"Path",
|
||||
error, @"Error", nil];
|
||||
return [handler fileManager: self
|
||||
shouldProceedAfterError: errorInfo];
|
||||
|
@ -3645,8 +3651,14 @@ static inline void gsedRelease(GSEnumeratedDirectory X)
|
|||
if ([handler respondsToSelector:
|
||||
@selector (fileManager:shouldProceedAfterError:)])
|
||||
{
|
||||
/* wl 20250114: For a very long time, this method incorrectly was
|
||||
* using NSFilePathErrorKey instead of the documented key @"Path"
|
||||
* to report the affected path. For backward compatibility we keep
|
||||
* setting the wrong key below.
|
||||
*/
|
||||
NSDictionary *errorInfo = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
path, NSFilePathErrorKey,
|
||||
path, @"Path",
|
||||
fromPath, @"FromPath",
|
||||
toPath, @"ToPath",
|
||||
error, @"Error", nil];
|
||||
|
|
Loading…
Reference in a new issue