Community
Participate
Working Groups
- create a folder (f1) - open the properties on f1 and set the read-only flag - create a file in the folder f1 You will get an error message saying "Could not write file: <full file name path>". It does not tell you that the folder is read-only. It really should not let you pick a folder that is read-only. NOTES: EJP (6/25/01 2:13:25 PM) - WinNT allows the user to create the file in a read only folder. - Linux shows the above message. EJP (6/25/01 2:19:41 PM) Moving to core. We get this message from a CoreException.
PRODUCT VERSION: 0.118
Working as expected on Windows. I suspect there's not much we can do here, except possibly providing the IOException text. Moving back to "Inbox" because I don't have a Linux box for further investigation.
I agree with John. We are passing the IOException already and the UI could show it to the user in a "details" dialog. In cases that are not creation, we do check if a file itself is read-only when writing to it which seems reasonable. Checking the folder hierarchy to see if there are any ready only folder seems too much. Suggest closing this bug.
Please do not close this PR. Instead, if there is nothing that Core can do, it should be sent back to the UI bucket. We can't just display the IO error message to the user. Actually, most of the error messages are useless to the end user (ui usually just displays the exception it caught...not very user friendly). One option if for the file wizard to check for read-only folder and not allow it to be selected as the parent container for the file. This does not cover other wizards which may not use our code for file creation. Also, since on Windows creating is allowed, do we want to restrict users on this platform?
Moving to Platform/UI as requested.
Revist post 2.0
Reopen for investigation
Errors are not presented well to the user and showing a stack trace is not the answer. This should be fixed and will require support from multiple components.
I wouldn't disallow creating a file/folder in a read-only folder just because some platforms don't support it. I also don't think we should introduce platform specific code for this at the UI level. We could improve the error message. When the create fails we could test if the parent folder is read-only and display a better error message. Better yet, Core could perform this check and set an appropriate error message and status code. That would cover all wizards and not just ours, assuming they all display the error message supplied by Core. Opened bug 25662 asking for a better error code/message.
Looks like Core is not going to address bug 25662, so we should add the check ourselves.
Core has improved error message for file/folder creation in read-only folders.