Adding tags etc. requires the file to be writable, so disallow editing
for readonly files.
Depends on D20980
astippich | |
ngraham |
Baloo |
Adding tags etc. requires the file to be writable, so disallow editing
for readonly files.
Depends on D20980
Automatic diff as part of commit; lint not applicable. |
Automatic diff as part of commit; unit tests not applicable. |
Doesn't this add a whole lot of new stat calls? Is there any other way we can determine this from data we already have?
For the single file case (IndexedDataRetriever) it does not really matter IMHO, and we also do a couple of getxattr calls on the file anyway. It is also done in a job (contrary to the old code before D20980).
For the multiple file case ('FileFetchJob`), the check is skipped after the first negative result, and when xattrs are not supported at all. Also, the "its a job" and "we call getxattr already" applies as well. For a way to reduce the number of blocking syscalls, see D20967 - this often removes 3 out of 4 syscalls (no comment, tag, rating, originURL).