Skip to content

Commit 3c110c5

Browse files
authored
Merge pull request #1329 from ericmehl/clean-extraction-directory
installDependencies : Clean extraction directory
2 parents abc0801 + 59d40b2 commit 3c110c5

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

config/installDependencies.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -96,14 +96,13 @@
9696
subprocess.check_output( "7z x %s -o%s -aoa -y" % ( archiveFileName, args.dependenciesDir ) )
9797
# 7z (and zip extractors generally) don't have an equivalent of --strip-components=1
9898
# Copy the files up one directory level to compensate
99-
for p in glob.glob(
100-
os.path.join(
101-
args.dependenciesDir.replace( "/", "\\" ),
102-
os.path.splitext( args.archiveURL.split( "/" )[-1] )[0],
103-
"*"
104-
)
105-
):
99+
extractedPath = os.path.join(
100+
args.dependenciesDir.replace( "/", "\\" ),
101+
os.path.splitext( args.archiveURL.split( "/" )[-1] )[0]
102+
)
103+
for p in glob.glob( os.path.join( extractedPath, "*" ) ):
106104
shutil.move( p, args.dependenciesDir )
105+
os.rmdir( extractedPath )
107106

108107
# Remove all Cortex related files from the package, so there is no conflict
109108
# with the files generated by our build.

0 commit comments

Comments
 (0)