fix bugs: gbs import XXX.spec error when the dir of spec file contains contents
authorGuan Junchun <junchunx.guan@intel.com>
Wed, 21 Mar 2012 05:55:34 +0000 (13:55 +0800)
committerGuan Junchun <junchunx.guan@intel.com>
Wed, 21 Mar 2012 05:55:34 +0000 (13:55 +0800)
gitbuildsys/cmd_import.py

index a8192ba23d7ed2ad14e02f9fa060f15e068ce451..9a7fa2aadca02205a6617403c9e70ffc33a1aec4 100644 (file)
@@ -116,7 +116,7 @@ def do(opts, args):
 
     packagingfiles = glob.glob('%s/*' % basedir)
     for f in  packagingfiles:
-        if f.endswith(os.path.basename(tarball)):
+        if f.endswith(os.path.basename(tarball)) or not os.path.isfile(f):
             continue
         shutil.copy(f, packagingdir)