Changeset 739:11bdf1dc2e4b in hatta-dev for hatta.py
Legend:
- Unmodified
- Added
- Removed
-
hatta.py
r732 r739 410 410 repo_file = self._title_to_file(title) 411 411 file_path = self._file_path(title) 412 if os.path.islink(file_path) :413 raise werkzeug.exceptions.Forbidden(_(u"Can't edit symbolic links "))412 if os.path.islink(file_path) or os.path.isdir(file_path): 413 raise werkzeug.exceptions.Forbidden(_(u"Can't edit symbolic links or directories")) 414 414 mercurial.util.rename(file_name, file_path) 415 415 changectx = self._changectx() … … 481 481 repo_file = self._title_to_file(title) 482 482 file_path = self._file_path(title) 483 if os.path.islink(file_path) :484 raise werkzeug.exceptions.Forbidden(_(u"Can't edit symbolic links "))483 if os.path.islink(file_path) or os.path.isdir(file_path): 484 raise werkzeug.exceptions.Forbidden(_(u"Can't edit symbolic links or directories")) 485 485 try: 486 486 os.unlink(file_path) … … 494 494 495 495 file_path = self._file_path(title) 496 if os.path.islink(file_path) :497 raise werkzeug.exceptions.Forbidden(_(u"Can't read symbolic links "))496 if os.path.islink(file_path) or os.path.isdir(file_path): 497 raise werkzeug.exceptions.Forbidden(_(u"Can't read symbolic links or directories")) 498 498 try: 499 499 return open(file_path, "rb") … … 1913 1913 except werkzeug.exceptions.Forbidden: 1914 1914 yield werkzeug.html.p( 1915 werkzeug.html(_(u"Can't edit symbolic links ")))1915 werkzeug.html(_(u"Can't edit symbolic links or directories"))) 1916 1916 return 1917 1917 if preview:
Note: See TracChangeset
for help on using the changeset viewer.
