Bug 199548 - IFileService#setReadOnly() should not touch the file system if not necessary
Summary: IFileService#setReadOnly() should not touch the file system if not necessary
Status: RESOLVED FIXED
Alias: None
Product: Target Management
Classification: Tools
Component: RSE (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 2.0.1   Edit
Assignee: Martin Oberhuber CLA
QA Contact: Martin Oberhuber CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-10 07:21 EDT by Martin Oberhuber CLA
Modified: 2007-08-10 07:36 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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