[tbb-commits] [Git][tpo/applications/rbm][main] Bug 40075: Create destination directory when creating input_files with `content`

richard (@richard) git at gitlab.torproject.org
Tue Mar 19 01:29:18 UTC 2024



richard pushed to branch main at The Tor Project / Applications / RBM


Commits:
05e32169 by Nicolas Vigier at 2024-03-18T13:52:40+01:00
Bug 40075: Create destination directory when creating input_files with `content`

- - - - -


1 changed file:

- lib/RBM.pm


Changes:

=====================================
lib/RBM.pm
=====================================
@@ -1001,6 +1001,8 @@ sub input_files {
         my $file_gpg_id = gpg_id($t->('file_gpg_id'));
         if (input_file_need_dl($input_file, $t, $fname, $action)) {
             if ($t->('content')) {
+                my $dname = dirname("$proj_out_dir/$name");
+                make_path($dname) unless -d $dname;
                 path("$proj_out_dir/$name")->spew_utf8($t->('content'));
             } elsif ($t->('URL')) {
                 urlget($project, {%$options, %$input_file, filename => $name}, 1);



View it on GitLab: https://gitlab.torproject.org/tpo/applications/rbm/-/commit/05e32169dfad9f3cc3eb6aa3f93d9b7a1690290e

-- 
View it on GitLab: https://gitlab.torproject.org/tpo/applications/rbm/-/commit/05e32169dfad9f3cc3eb6aa3f93d9b7a1690290e
You're receiving this email because of your account on gitlab.torproject.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.torproject.org/pipermail/tbb-commits/attachments/20240319/c833f770/attachment-0001.htm>


More information about the tbb-commits mailing list