Fix Library Sync crash for Android

- Caused by PKC wanting to copy permissions bits as well
This commit is contained in:
Croneter 2018-06-09 12:56:21 +02:00 committed by croneter
parent 0f16ebe78f
commit 45c4d7f479
1 changed files with 9 additions and 11 deletions

View File

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
###############################################################################
from logging import getLogger
from shutil import copytree
from distutils import dir_util
import xml.etree.ElementTree as etree
from os import makedirs
@ -77,11 +77,10 @@ class VideoNodes(object):
# Verify the video directory
if not exists_dir(path):
copytree(
src=try_decode(xbmc.translatePath(
"special://xbmc/system/library/video")),
dst=try_decode(xbmc.translatePath(
"special://profile/library/video")))
dir_util.copy_tree(
src=xbmc.translatePath("special://xbmc/system/library/video"),
dst=xbmc.translatePath("special://profile/library/video"),
preserve_mode=0) # do not copy permission bits!
# Create the node directory
if mediatype != "photos":
@ -394,11 +393,10 @@ class VideoNodes(object):
# Create the video node directory
if not exists_dir(nodepath):
# We need to copy over the default items
copytree(
src=try_decode(xbmc.translatePath(
"special://xbmc/system/library/video")),
dst=try_decode(xbmc.translatePath(
"special://profile/library/video")))
dir_util.copy_tree(
src=xbmc.translatePath("special://xbmc/system/library/video"),
dst=xbmc.translatePath("special://profile/library/video"),
preserve_mode=0) # do not copy permission bits!
labels = {
'Favorite movies': 30180,