insinto changes for glob compatibility
This commit is contained in:
@@ -190,9 +190,12 @@ def insinto(destinationDirectory, sourceFile, destinationFile = ''):
|
|||||||
'''insert a sourceFile into destinationDirectory as a destinationFile with same uid/guid/permissions'''
|
'''insert a sourceFile into destinationDirectory as a destinationFile with same uid/guid/permissions'''
|
||||||
makedirs(get.installDIR() + destinationDirectory)
|
makedirs(get.installDIR() + destinationDirectory)
|
||||||
|
|
||||||
for file in glob.glob(sourceFile):
|
if not destinationFile:
|
||||||
if can_access_file(file):
|
for file in glob.glob(sourceFile):
|
||||||
shutil.copy(sourceFile, get.installDIR() + os.path.join(destinationDirectory, destinationFile))
|
if can_access_file(file):
|
||||||
|
shutil.copy(file, get.installDIR() + os.path.join(destinationDirectory, os.path.basename(file)))
|
||||||
|
else:
|
||||||
|
shutil.copy(sourceFile, get.installDIR() + os.path.join(destinationDirectory, destinationFile))
|
||||||
|
|
||||||
''' ************************************************************************** '''
|
''' ************************************************************************** '''
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user