浏览代码

Dpkg::Source::Package: Use “-z” instead of “not -s”

Guillem Jover 15 年之前
父节点
当前提交
d97161c298
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      scripts/Dpkg/Source/Package/V2.pm
  2. 1 1
      scripts/Dpkg/Source/Package/V3/quilt.pm

+ 1 - 1
scripts/Dpkg/Source/Package/V2.pm

@@ -501,7 +501,7 @@ sub do_build {
     my $tmpdiff = $self->generate_patch($dir, order_from => $autopatch,
                                         handle_binary => $handle_binary,
                                         usage => 'build');
-    unless (not -s $tmpdiff or $self->{'options'}{'single_debian_patch'}
+    unless (-z $tmpdiff or $self->{'options'}{'single_debian_patch'}
             or $self->{'options'}{'auto_commit'}) {
         info(_g("you can integrate the local changes with %s"),
              "dpkg-source --commit");

+ 1 - 1
scripts/Dpkg/Source/Package/V3/quilt.pm

@@ -389,7 +389,7 @@ sub register_patch {
             erasedir(File::Spec->catdir($dir, ".pc", $patch_name));
         }
         # Clean up empty series
-        unlink($series) if not -s $series;
+        unlink($series) if -z $series;
     }
     return $patch;
 }