Bug 3043 - [Wizards] Creating file in read-only folder error msg too generic (1GEUUTQ)
Summary: [Wizards] Creating file in read-only folder error msg too generic (1GEUUTQ)
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: All Linux
: P2 normal (vote)
Target Milestone: 2.1 M4   Edit
Assignee: Knut Radloff CLA
QA Contact:
URL:
Whiteboard:
Keywords: investigate
Depends on:
Blocks:
 
Reported: 2001-10-10 22:48 EDT by Simon Arsenault CLA
Modified: 2002-12-16 16:08 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Arsenault CLA 2001-10-10 22:48:21 EDT
- 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.
Comment 1 DJ Houghton CLA 2001-10-24 06:42:05 EDT
PRODUCT VERSION:
	0.118

Comment 2 John Arthorne CLA 2001-11-05 11:59:01 EST
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.

Comment 3 Rodrigo Peretti CLA 2001-11-23 16:31:14 EST
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.
Comment 4 Simon Arsenault CLA 2001-11-23 17:31:36 EST
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?
Comment 5 DJ Houghton CLA 2001-12-10 11:10:28 EST
Moving to Platform/UI as requested.
Comment 6 Kevin Haaland CLA 2002-05-30 20:34:12 EDT
Revist post 2.0
Comment 7 Randy Giffen CLA 2002-08-08 16:33:09 EDT
Reopen for investigation
Comment 8 Kevin Haaland CLA 2002-09-03 13:56:06 EDT
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. 
Comment 9 Knut Radloff CLA 2002-11-01 17:11:42 EST
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.
Comment 10 Nick Edgar CLA 2002-11-09 13:07:30 EST
Looks like Core is not going to address bug 25662, so we should add the check 
ourselves.
Comment 11 Knut Radloff CLA 2002-12-16 16:08:35 EST
Core has improved error message for file/folder creation in read-only folders.