parent
52cfd174f1
commit
f274cdd973
|
@ -685,14 +685,14 @@ class FileBuffer(Buffer):
|
||||||
try:
|
try:
|
||||||
data = self.make_string()
|
data = self.make_string()
|
||||||
if self.windows[0].mode.savetabs:
|
if self.windows[0].mode.savetabs:
|
||||||
data = data.replace(" ", "\t").encode(self.codec)
|
data = data.replace(" ", "\t")
|
||||||
|
data = self.write_filter(data.encode(self.codec))
|
||||||
data = self.write_filter(data)
|
|
||||||
|
|
||||||
f2 = self._open_file_w(self.path, preserve=False)
|
f2 = self._open_file_w(self.path, preserve=False)
|
||||||
f2.write(self.bytemark + data)
|
f2.write(self.bytemark + data)
|
||||||
f2.close()
|
f2.close()
|
||||||
except Exception, e:
|
#except Exception, e:
|
||||||
|
except NameError, e:
|
||||||
if exists: shutil.copyfile(temp_path, self.path)
|
if exists: shutil.copyfile(temp_path, self.path)
|
||||||
raise e
|
raise e
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue