--- worker.py 2013-03-02 14:42:41.950212511 -0500 +++ worker.py.alt 2013-03-01 23:30:57.581931486 -0500 @@ -493,14 +493,37 @@ OUT.debug('Trying to softlink', 8) if not self.__p: + if self.__v: + print("\n>>> SOFTLINKING FILE: ") + print(">>> Source: " + src_name + + "\n>>> Destination: " + dst_name + "\n") os.symlink(src_name, dst_name) - + my_contenttype = 'sym' except Exception as e: if self.__v: OUT.warn('Failed to softlink (' + str(e) + ')') + + elif self.__link_type == 'clone': + try: + + OUT.debug('Trying to copy files directly', 8) + + if not self.__p: + if self.__v: + print("\n>>> COPYING FILE: ") + print(">>> Source: " + src_name + + "\n>>> Destination: " + dst_name + "\n") + shutil.copy(src_name, dst_name) + + my_contenttype = 'file' + + except Exception as e: + + if self.__v: + OUT.warn('Failed to copy (' + str(e) + ')') elif os.path.islink(src_name): try: @@ -508,6 +531,10 @@ OUT.debug('Trying to copy symlink', 8) if not self.__p: + if self.__v: + print("\n>>> SYMLINK COPY: ") + print(">>> Source: " + src_name + + "\n>>> Destination: " + dst_name + "\n") os.symlink(os.readlink(src_name), dst_name) my_contenttype = 'sym' @@ -523,7 +550,11 @@ OUT.debug('Trying to hardlink', 8) if not self.__p: - os.link(src_name, dst_name) + if self.__v: + print("\n>>> HARDLINKING FILE: ") + print(">>> Source: " + src_name + + "\n>>> Destination: " + dst_name + "\n") + os.link(src_name, dst_name) my_contenttype = 'file' @@ -533,8 +564,13 @@ OUT.warn('Failed to hardlink (' + str(e) + ')') if not my_contenttype: + if not self.__p: - shutil.copy(src_name, dst_name) + if self.__v: + print("\n>>> COPYING FILE: ") + print(">>> Source: " + src_name + + "\n>>> Destination: " + dst_name + "\n") + shutil.copy(src_name, dst_name) my_contenttype = 'file'