From 95b1b6b1bbf98f10bb86d5e7880683b27aaddfcd Mon Sep 17 00:00:00 2001 From: owsla Date: Tue, 25 Dec 2007 01:42:53 +0000 Subject: We should FatalError at the point where the malformed UTF-8 character is first encountered, instead of catching it and then letting it cause more trouble down the road. git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@858 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109 --- rdiff-backup/rdiff_backup/fs_abilities.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/rdiff-backup/rdiff_backup/fs_abilities.py b/rdiff-backup/rdiff_backup/fs_abilities.py index 6a978b9..7646d87 100644 --- a/rdiff-backup/rdiff_backup/fs_abilities.py +++ b/rdiff-backup/rdiff_backup/fs_abilities.py @@ -227,12 +227,13 @@ class FSAbilities: except (IOError, OSError): # Broken CIFS setups will sometimes create UTF-8 files # and even stat them, but not let us perform file operations - # on them. Test file will be deleted via shutil.rmtree() - # when subdir is deleted. UTF-8 characters not in the + # on them. Test file cannot be deleted. UTF-8 chars not in the # underlying codepage get translated to '?' - self.extended_filenames = 0 - else: - self.extended_filenames = 1 + log.Log.FatalError("Could not delete extended filenames test " + "file. If you are using a CIFS share, please" + " see the FAQ entry about characters being " + "transformed to a '?'") + self.extended_filenames = 1 def set_win_reserved_filenames(self, subdir): """Set self.win_reserved_filenames by trying to write a path""" -- cgit v1.2.1