Bug 199548

Summary: IFileService#setReadOnly() should not touch the file system if not necessary
Product: [Tools] Target Management Reporter: Martin Oberhuber <mober.at+eclipse>
Component: RSEAssignee: Martin Oberhuber <mober.at+eclipse>
Status: RESOLVED FIXED QA Contact: Martin Oberhuber <mober.at+eclipse>
Severity: enhancement    
Priority: P3    
Version: 2.0   
Target Milestone: 2.0.1   
Hardware: All   
OS: All   
Whiteboard:

Description Martin Oberhuber CLA 2007-08-10 07:21:21 EDT
The RSE EFS Provider performs setReadOnly / setLastModified() calls when copying or moving files. After that, permissions are updated.

If the permissions or attributes are already as expected, the file service should not perform any actions on the file system in order to avoid unnecessary errors or exceptions; for instance, if a file belongs to another user, but is already read-only, an unnecessary setReadOnly() call would unnecessarily throw an exception.

Javadoc of IFileService#setReadOnly() should also be updated to return true if nothing was done.
Comment 1 Martin Oberhuber CLA 2007-08-10 07:36:53 EDT
Fixed:
[199548] Avoid touching files on setReadOnly() if unnecessary
   IFileService
   FTPService
   LocalFileService
   SftpFileService
   UniversalFileSystemMiner