chiark / gitweb /
tmpfiles: restore previous behavior for F/f
authorDave Reisner <dreisner@archlinux.org>
Fri, 28 Sep 2012 00:48:13 +0000 (20:48 -0400)
committerDave Reisner <dreisner@archlinux.org>
Fri, 28 Sep 2012 00:53:05 +0000 (20:53 -0400)
d4e9eb91ea changed the behavior for the F and f actions, wrongly sending
them to glob_item(). Restore the old behavior and shortcut straight to
write_one_file().

src/tmpfiles/tmpfiles.c

index f10f90845e08d9337bf6c006896a35467fba295c..bf900fa3d9c458460b2218dffa08e7e32940fe26 100644 (file)
@@ -673,6 +673,10 @@ static int create_item(Item *i) {
 
         case CREATE_FILE:
         case TRUNCATE_FILE:
 
         case CREATE_FILE:
         case TRUNCATE_FILE:
+                r = write_one_file(i, i->path);
+                if (r < 0)
+                        return r;
+                break;
         case WRITE_FILE:
                 r = glob_item(i, write_one_file);
                 if (r < 0)
         case WRITE_FILE:
                 r = glob_item(i, write_one_file);
                 if (r < 0)