mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 06:40:47 +00:00
Make sure NSSavePanel and NSOpenPanel show the contents of their
initial directory regardless of the result of validation. This should fix bug #25363. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27820 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
75f908ff62
commit
f980764a02
2 changed files with 28 additions and 13 deletions
|
@ -1663,21 +1663,32 @@ createRowsForColumn: (int)column
|
|||
pathAndFile = [path stringByAppendingPathComponent: file];
|
||||
exists = [_fm fileExistsAtPath: pathAndFile
|
||||
isDirectory: &isDir];
|
||||
if (isDir && !_treatsFilePackagesAsDirectories
|
||||
&& [ws isFilePackageAtPath: pathAndFile])
|
||||
{
|
||||
isDir = NO;
|
||||
}
|
||||
if (_delegateHasShowFilenameFilter)
|
||||
{
|
||||
exists = [_delegate panel: self shouldShowFilename: pathAndFile];
|
||||
}
|
||||
|
||||
if (exists && !isDir)
|
||||
/* Note: The initial directory and its parents are always shown, even if
|
||||
* it they are file packages or would be rejected by the validator. */
|
||||
#define HAS_PATH_PREFIX(aPath, otherPath) \
|
||||
([aPath isEqualToString: otherPath] || \
|
||||
[aPath hasPrefix: [otherPath stringByAppendingString: @"/"]])
|
||||
|
||||
if (exists && (!isDir || !HAS_PATH_PREFIX(_directory, pathAndFile)))
|
||||
{
|
||||
exists = [self _shouldShowExtension: extension];
|
||||
}
|
||||
|
||||
if (isDir && !_treatsFilePackagesAsDirectories
|
||||
&& [ws isFilePackageAtPath: pathAndFile])
|
||||
{
|
||||
isDir = NO;
|
||||
}
|
||||
|
||||
if (_delegateHasShowFilenameFilter)
|
||||
{
|
||||
exists = [_delegate panel: self shouldShowFilename: pathAndFile];
|
||||
}
|
||||
|
||||
if (exists && !isDir)
|
||||
{
|
||||
exists = [self _shouldShowExtension: extension];
|
||||
}
|
||||
}
|
||||
|
||||
if (exists)
|
||||
{
|
||||
if (addedRows == 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue