Community
Participate
Working Groups
RSENTFTPEntryParser.java version 1.2 was changed to only treat "*.exe" files as executable. This is not correct, because on Windows any file type can be registered to be executable - some typical extensions include *.bat, *.cmd, *,com, *.js, *.vbs Moreover, the check would need to be case insensitive (*.EXE, *.eXe etc) Supposedly because the concept of being executable is not clearly defined, commercial FTP (and also Samba) clients typically treat ALL files as executable on Windows servers. I checked with CuteFTP. Original behavior of RSENTFTPEntryParser.java version 1.1 should be restored.
When marking one file as "executable", it is shown in the FTP client tree with a small 'binary and play' and icon decorator (same as in SSH). Marking all files as executable looks like all remote files are binary, and it can be confusing. I would prefer ending up with a list of "binary and executable" extensions, unless marking a file as executable were used somewhere else a part of the icon decorator. What do you think ? I agree with not being case-sensitive, it's quite easy to solve.
At the moment, the implementation is consistent with Windows Local file classification: From org.eclipse.rse.services.clientserver.SystemFileClassifier.classifyNonVirtual(String): // for Windows, we only detect *.exe and *.dll files if (isWindows) { absolutePath = absolutePath.toLowerCase(); // classify *.class file if (absolutePath.endsWith(".class")) { //$NON-NLS-1$ type = classifyClassFile(absolutePath); } // *.exe files are binary executables else if (absolutePath.endsWith(".exe")) { //$NON-NLS-1$ type = "executable(binary)"; //$NON-NLS-1$ } // *.dll files are of type "module" else if (absolutePath.endsWith(".dll")) { //$NON-NLS-1$ type = "module"; //$NON-NLS-1$ } return type; }
It is not consistent. They do at least toLowerCase(). It is not comparable with SSH because SSH does no file pattern matching. Taking into account that having the "executable" bit is more dangerous than helpful, that it is only used for the file classifier, and in order to be consistent with Local, I'm OK with handling the *.exe pattern only. I also noticed that it is not a regression since the classifier was not used before so it had not been visible to the outside. Updating summary and marking minor.
I agree with covering mixed cases, I'll commit a fix for it.
Now the pattern is compared in lower case, so mixed cases of ".exe" are considered executable.