mirror of
https://github.com/SickGear/SickGear.git
synced 2025-01-22 01:23:43 +00:00
Use a subprocess and cp for copying files on posix systems to preserve file metadata.
This commit is contained in:
parent
9772e8e41f
commit
7d8cc2cfed
2 changed files with 7 additions and 1 deletions
|
@ -38,6 +38,7 @@
|
||||||
* Change indicate when not sorting with article by dimming ("The", "A", "An") on Show List, Episode, History,
|
* Change indicate when not sorting with article by dimming ("The", "A", "An") on Show List, Episode, History,
|
||||||
Mass Update, Add with Browse and from Existing views
|
Mass Update, Add with Browse and from Existing views
|
||||||
* Add Emby notifier to config/Notifications
|
* Add Emby notifier to config/Notifications
|
||||||
|
* Use a subprocess and cp for copying files on posix systems to preserve file metadata
|
||||||
* Fix alternative unicode show names from breaking search
|
* Fix alternative unicode show names from breaking search
|
||||||
* Change show update, set shows with newly added airdate or existing episodes with future or never dates, to "Wanted"
|
* Change show update, set shows with newly added airdate or existing episodes with future or never dates, to "Wanted"
|
||||||
* Fix rare NameParser case where numeric episode name was parsed as episode number
|
* Fix rare NameParser case where numeric episode name was parsed as episode number
|
||||||
|
|
|
@ -33,6 +33,7 @@ import time
|
||||||
import traceback
|
import traceback
|
||||||
import urlparse
|
import urlparse
|
||||||
import uuid
|
import uuid
|
||||||
|
import subprocess
|
||||||
|
|
||||||
import adba
|
import adba
|
||||||
import requests
|
import requests
|
||||||
|
@ -286,7 +287,11 @@ def listMediaFiles(path):
|
||||||
|
|
||||||
|
|
||||||
def copyFile(srcFile, destFile):
|
def copyFile(srcFile, destFile):
|
||||||
ek.ek(shutil.copyfile, srcFile, destFile)
|
if os.name.startswith('posix'):
|
||||||
|
subprocess.call(['cp', srcFile, destFile])
|
||||||
|
else:
|
||||||
|
ek.ek(shutil.copyfile, srcFile, destFile)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
ek.ek(shutil.copymode, srcFile, destFile)
|
ek.ek(shutil.copymode, srcFile, destFile)
|
||||||
except OSError:
|
except OSError:
|
||||||
|
|
Loading…
Reference in a new issue