Fixed publisher publish relative path error

This commit is contained in:
2020-11-22 00:10:52 +01:00
parent 96d3ccd8d2
commit b31c0dd23c
4 changed files with 43 additions and 10 deletions

View File

@@ -1,10 +1,10 @@
# -*- coding: utf-8 -*-
"""
sh_edraft common python library
sh_edraft
~~~~~~~~~~~~~~~~~~~
Library to share common classes and models used at sh-edraft.de
:copyright: (c) 2020 sh-edraft.de
:license: MIT, see LICENSE for more details.

View File

@@ -153,10 +153,18 @@ class Publisher(PublisherBase):
dist_path = dist_path[:len(dist_path) - 1]
for file in self._included_files:
if file not in self._excluded_files:
is_file_excluded = False
if file in self._excluded_files:
is_file_excluded = True
else:
for excluded in self._excluded_files:
if file.__contains__(excluded):
is_file_excluded = True
if not is_file_excluded:
output_file = ''
if file.startswith('..'):
output_file = file.replace('..', '', 1)
output_file = file.replace('..', '')
elif file.startswith('.'):
output_file = file.replace('.', '', 1)