use linktastic

thanks berkona
This commit is contained in:
Clinton Hall 2013-02-16 17:35:29 -08:00
commit a09b5e0fda

View file

@ -4,7 +4,7 @@ import autoProcessMovie
import autoProcessTV import autoProcessTV
import sys, os, ConfigParser, shutil import sys, os, ConfigParser, shutil
import logging, logging.config import logging, logging.config
from subprocess import call import linktastic
from nzbToMediaEnv import * from nzbToMediaEnv import *
@ -222,12 +222,7 @@ elif useLink == 1 and packed == 0 and video == 1: ## hardlink
source = os.path.join(dirpath, file) source = os.path.join(dirpath, file)
target = os.path.join(destination, file) target = os.path.join(destination, file)
if os.name == 'nt': linktastic.link(source, target)
subprocess.call(['cmd', '/C', 'mklink', '/H', source, target], stdout=subprocess.PIPE)
elif os.name == 'posix':
os.link(source, target)
else:
Logger.info("Hardlink failed, cannot determine OS.")
elif packed == 1: ## unpack elif packed == 1: ## unpack
## Using Windows? ## Using Windows?