1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-04 15:45:25 +02:00

Mark directories that are not executable as not writable, to be in sync with java.io.File (see also bug 154302)

This commit is contained in:
Martin Oberhuber 2006-08-23 15:25:03 +00:00
parent d60ee146aa
commit edd7b91887

View file

@ -292,8 +292,14 @@ public class SftpFileService extends AbstractFileService implements IFileService
if (perms.indexOf('w',1)<=0) {
node.setWritable(false); //not writable by anyone
}
if (perms.indexOf('x',1)>0) {
node.setExecutable(true); //executable by someone
if (node.isDirectory()) {
if (perms.indexOf('x',1)<=0) {
node.setWritable(false); //directories that are not executable are also not readable
}
} else {
if (perms.indexOf('x',1)>0) {
node.setExecutable(true); //executable by someone
}
}
if (attrs.getExtended()!=null) {
node.setExtendedData(attrs.getExtended());