GNOME Bugzilla – Bug 305828
Add GNOME_VFS_ERROR_INVALID_FILENAME
Last modified: 2006-07-14 14:34:41 UTC
Add GNOME_VFS_ERROR_INVALID_FILENAME for filenames which are not supported by the filesystem. For example, when the filename contains chars which would act as control chars on the FS.
Shouldn't we just be using GNOME_VFS_ERROR_INVALID_URI for that? A invalid FILENAME is just a special case of a invalid URI, right?
Created attachment 47001 [details] [review] Proposed patch
GNOME_VFS_ERROR_INVALID_URI is returned when the URI has invalid syntax. When we have an invalid filename, the URI syntax is valid but the filename itself is invalid for the current module.
Another example: You try to pass a filename with umlauts to a method which doesn't support it. The URI "method:///nirvana/ex%E4mpl%F6.file" is perfectly valid but the filename "exämplö.file" is not valid for the current method.
Wouldn't that be GNOME_VFS_ERROR_NOT_FOUND?
Would it? You probably mean for open(), do you? I need that return for create() and move(). I find that there is no fitting error right now.
the bug has a patch
Updating bug version. I think we could use this to wrap the EINVAL retval for FAT32 file system operations, and use it in the async calls when providing a duplicate name.
Committed to cvs head. Thanks.