distgit: Ensure the folder exists
We can't hard link the file if the folder containing the link destination does not exist. Hurray for testing in staging!
This commit is contained in:
parent
e570c2f271
commit
2e35fa64a3
1 changed files with 3 additions and 2 deletions
|
@ -177,8 +177,9 @@ def main():
|
||||||
|
|
||||||
# Add the file to the old path, where fedpkg is currently looking for it
|
# Add the file to the old path, where fedpkg is currently looking for it
|
||||||
if hash_type == "md5":
|
if hash_type == "md5":
|
||||||
old_path = os.path.join(module_dir, filename, checksum, filename)
|
old_dir = os.path.join(module_dir, filename, checksum)
|
||||||
os.link(dest_file, old_path)
|
os.makedirs(old_dir)
|
||||||
|
os.link(dest_file, os.path.join(old_dir, filename))
|
||||||
|
|
||||||
# Emit a fedmsg message. Load the config to talk to the fedmsg-relay.
|
# Emit a fedmsg message. Load the config to talk to the fedmsg-relay.
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue