1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-01-19 11:31:26 +01:00
Commit graph

9 commits

Author SHA1 Message Date
Mikael Magnusson
9ca9a092de 36302: attr: Fix compilation with libcap 2.24 2015-08-28 05:12:29 +02:00
Mikael Magnusson
a9004ce32f 33607: Fix some minor problems in zattr module
Remove the listattr call in zgetattr, it only caused no error to be output
when trying to retrieve an xattr from a file with no xattrs. When a file
had xattrs, it would just add an extra syscall for no good reason.

Always set an array parameter in zlistattr, this makes the returned value
much easier to use; in fact the _zattr completer didn't account for this
and zlistattr foo <tab> on a file with only one attribute did not work.

Almost all of the patch is only reindent, the only modification that's
not a pure deletions is:
 -        ret = 1 + (attr_len > val_len || attr_len < 0);
 +        ret = 1 + ((val_len > 0 && attr_len > val_len) || attr_len < 0);
which makes sure we return the correct error in the new path due to the
removed listattr call. (If val_len is -1 due to no attribute existing,
it doesn't mean the user should retry the call because the attribute
grew in size).
2014-11-07 11:10:30 +01:00
Peter Stephenson
a3055b2363 Mikael: 27362: some more attr fixes 2009-11-07 23:57:27 +00:00
Peter Stephenson
f30af94885 27357: fix compiler warnings in attr module
27358: fix error if $0 altered in sourced file
2009-11-06 22:38:47 +00:00
Peter Stephenson
39e4cfd4db Jun T.: 27351: zdelattr missed first argument 2009-11-05 09:44:32 +00:00
Peter Stephenson
eeb5b6c941 Mikael: 27347: enhance extended attribute support 2009-11-04 11:33:59 +00:00
Peter Stephenson
6594c0375b 26697: test for Linux- and Mac-style xattr functions 2009-03-08 20:20:47 +00:00
Peter Stephenson
919f7b12ad 26671: various minor attribute tidy ups 2009-03-03 16:40:34 +00:00
Peter Stephenson
d58e5061ad Mikael Magnusson: 26670: add zsh/attr module 2009-03-03 15:04:15 +00:00