Skip to content

Commit

Permalink
ftp: show SIZE facts for directories
Browse files Browse the repository at this point in the history
Motivation:

The Globus server supplies the SIZE fact for directories.

Although supplying this information is not required by any specification
or agreement, its omission may be causing problems with clients that are
unable to parse MLSD output.  Since we have this information anyway,
supplying it poses no additional overhead.

Modification:

Show size fact for directory items.

Result:

Potentially better compatibility with Globus clients.

Target: master
Request: 3.0
Request: 2.16
Requires-notes: yes
Requires-book: no
Patch: https://rb.dcache.org/r/10062/
Acked-by: Dmitry Litvintsev
  • Loading branch information
paulmillar committed Feb 16, 2017
1 parent 1d4f183 commit 85ef56e
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4284,7 +4284,6 @@ public Set<FileAttribute> getRequiredAttributes()
for (Fact fact: _currentFacts) {
switch (fact) {
case SIZE:
attributes.add(SIMPLE_TYPE);
attributes.add(SIZE);
attributes.addAll(_pdp.getRequiredAttributes());
break;
Expand Down Expand Up @@ -4345,7 +4344,7 @@ public void print(FsPath dir, FileAttributes dirAttr, DirectoryEntry entry)
for (Fact fact: _currentFacts) {
switch (fact) {
case SIZE:
if (attr.isDefined(SIZE) && attr.getFileType() != FileType.DIR) {
if (attr.isDefined(SIZE)) {
access = _pdp.canGetAttributes(_subject, attr, EnumSet.of(SIZE));
if (access == AccessType.ACCESS_ALLOWED) {
printSizeFact(attr);
Expand Down

0 comments on commit 85ef56e

Please sign in to comment.