diff --git a/VERSION b/VERSION index cc99b4f2..2217dbc7 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 1.99.3 (2011-11-23 17:29:51) dev +Version 1.99.3 (2011-11-23 23:04:18) dev diff --git a/gluon/dal.py b/gluon/dal.py index eb53ead3..ab172e0d 100644 --- a/gluon/dal.py +++ b/gluon/dal.py @@ -5591,8 +5591,9 @@ class Field(Expression): dest_file = open(pathfilename, 'wb') try: shutil.copyfileobj(file, dest_file) - finally: - dest_file.close() + except IOError: + raise IOError, 'Unable to store file "%s" because invalid permissions, readonly file system, or filename too long' % pathfilename + dest_file.close() return newfilename def retrieve(self, name, path=None):