Summary: | [SSH] Changing Read-Only Attribute Throws Exception | ||||||
---|---|---|---|---|---|---|---|
Product: | [Tools] Target Management | Reporter: | Kevin Doyle <kjdoyle> | ||||
Component: | RSE | Assignee: | Martin Oberhuber <mober.at+eclipse> | ||||
Status: | CLOSED FIXED | QA Contact: | Martin Oberhuber <mober.at+eclipse> | ||||
Severity: | normal | ||||||
Priority: | P3 | CC: | dmcknigh, kmunir, rgerganov | ||||
Version: | 2.0 | Keywords: | bugday | ||||
Target Milestone: | 3.0 RC2 | Flags: | rgerganov:
review+
|
||||
Hardware: | PC | ||||||
OS: | Windows XP | ||||||
Whiteboard: | |||||||
Attachments: |
|
Description
Kevin Doyle
2007-06-04 17:32:10 EDT
The SystemMessageException should include the original SftpException that caused it. But I do not see it in the backtrace below. Was there a "caused by..." entry in the backtrace? Was an error dialog shown that would include the cause? If not, we'll need to imporve error reporting to ensure we get the real cause of this displayed to the user. Tentatively targeting 2.0RC3, but I'll need more info to address this. No error dialog is shown. It looks like in SystemFilePropertyPage.performOk() we catch the exceptions and display them in the dialog, but ok = true so the dialog still closes. The SftpException that is wrapped shows the error message: 4: Failure. Assigning 2.0.1 since this does not happen consistently and is not critical. We should add a unit test for this (potentially exercising the function through EFS) and set folders and files read-only / writable repeatedly. Bulk update target milestone 2.0.1 -> 3.0 Created attachment 102052 [details]
Patch fixing the issue
Attached patch fixes the issue. Problem was that JSch.setStat(SftpATTR) doesn't really work properly because the flags in SftpATTR cannot be re-set with API as needed. The ChannelSftp.chmod() call must be done instead.
Unittest for the fix is RSEFileStoreTest.testDeleteSpecialCases()
Patch committed: [190904] Changing read-only attribute throws exception Rado please review. This is a simple small one :-) Looks good to me. It's nice to also have a unit test. Verified Fixed with 3.0RC2. |