From fa50cc19153c3ff87828c9a5ad9e83257c0b3737 Mon Sep 17 00:00:00 2001 From: ben Date: Sun, 22 Sep 2002 17:17:41 +0000 Subject: Fixed socket too long bug git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@210 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109 --- rdiff-backup/CHANGELOG | 8 ++++++++ rdiff-backup/TODO | 7 ++++++- rdiff-backup/rdiff_backup/rpath.py | 5 ++++- rdiff-backup/src/rpath.py | 5 ++++- 4 files changed, 22 insertions(+), 3 deletions(-) diff --git a/rdiff-backup/CHANGELOG b/rdiff-backup/CHANGELOG index 58774a4..9d77055 100644 --- a/rdiff-backup/CHANGELOG +++ b/rdiff-backup/CHANGELOG @@ -1,3 +1,11 @@ +New in v0.11.0 (2002/09/30) +--------------------------- + +If get a socket error from trying to create a socket whose name is too +long, just skip file instead of exiting with error (bug report by Ivo +De Decker). + + New in v0.10.1 (2002/09/16) --------------------------- diff --git a/rdiff-backup/TODO b/rdiff-backup/TODO index 72e6fd6..c44741c 100644 --- a/rdiff-backup/TODO +++ b/rdiff-backup/TODO @@ -1,4 +1,9 @@ -Update FAQ on cstream +add --exclude-special-files to exclude fifos, symlinks, sockets, and +device files. + +Change Windows mode to quote A-Z also. (--windows-mode could be short +for "--exclude-special-files --chars-to-quote A-Z: --quoting-char ; +--windows-time-format"). Write some better selection test cases to test new Iterate_fast func. diff --git a/rdiff-backup/rdiff_backup/rpath.py b/rdiff-backup/rdiff_backup/rpath.py index 14a68c7..f091ff4 100644 --- a/rdiff-backup/rdiff_backup/rpath.py +++ b/rdiff-backup/rdiff_backup/rpath.py @@ -209,7 +209,9 @@ class RPathStatic: """ assert rpath.conn is Globals.local_connection s = socket.socket(socket.AF_UNIX) - s.bind(rpath.path) + try: s.bind(rpath.path) + except socket.error, exc: + raise SkipFileException("Socket error: " + str(exc)) def gzip_open_local_read(rpath): """Return open GzipFile. See security note directly above""" @@ -838,6 +840,7 @@ import FilenameMapping from lazy import * from selection import * from destructive_stepping import * +from highlevel import * class RpathDeleter(ITRBranch): """Delete a directory. Called by RPath.delete()""" diff --git a/rdiff-backup/src/rpath.py b/rdiff-backup/src/rpath.py index 14a68c7..f091ff4 100644 --- a/rdiff-backup/src/rpath.py +++ b/rdiff-backup/src/rpath.py @@ -209,7 +209,9 @@ class RPathStatic: """ assert rpath.conn is Globals.local_connection s = socket.socket(socket.AF_UNIX) - s.bind(rpath.path) + try: s.bind(rpath.path) + except socket.error, exc: + raise SkipFileException("Socket error: " + str(exc)) def gzip_open_local_read(rpath): """Return open GzipFile. See security note directly above""" @@ -838,6 +840,7 @@ import FilenameMapping from lazy import * from selection import * from destructive_stepping import * +from highlevel import * class RpathDeleter(ITRBranch): """Delete a directory. Called by RPath.delete()""" -- cgit v1.2.1