From 8717ef57a7b2554fe35da27f3cfd775083538313 Mon Sep 17 00:00:00 2001 From: Csaba Henk Date: Thu, 10 Mar 2011 00:41:10 +0000 Subject: Revert "syncdaemon: Handling of deleted symlinks (of directories). When a symlink of a directory of master is deleted. The corresponding delete in slave is handled as rmdir() of the symlink assuming the file to be directory" This reverts commit bee672e5f70b3c6712280130aeb61da0674add11. Signed-off-by: Kaushik BV Signed-off-by: Vijay Bellur BUG: 2377 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2377 --- xlators/features/marker/utils/syncdaemon/resource.py | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'xlators/features') diff --git a/xlators/features/marker/utils/syncdaemon/resource.py b/xlators/features/marker/utils/syncdaemon/resource.py index f002f0eb1c4..d1a51ecb06f 100644 --- a/xlators/features/marker/utils/syncdaemon/resource.py +++ b/xlators/features/marker/utils/syncdaemon/resource.py @@ -123,22 +123,7 @@ class Server(object): for e in entries: cls.purge(os.path.join(path, e)) if me_also: - try: - os.rmdir(path) - except OSError: - ex = sys.exc_info()[1] - if ex.errno == ENOTDIR: - try: - os.unlink(path) - return - except OSError: - ex = sys.exc_info()[1] - if ex.errno != ENOENT: - raise - elif ex.errno == ENOENT: - logging.debug ("Trying to delete a file which is not present") - else: - raise + os.rmdir(path) @classmethod def _create(cls, path, ctor): -- cgit