@@ -393,13 +393,15 @@ if __name__ == "__main__":
393393 exit (1 )
394394
395395 foundapps = []
396+ copy_app = False
396397
397398 # if item is an app, just pass it on
398399 if item_extension == 'app' :
399400 if not os .path .exists (item_path ):
400401 print "This does not seem to be an Application!"
401402 exit (1 )
402403 foundapps .append (item_path )
404+ copy_app = True
403405
404406 dmgvolumepaths = []
405407 tmp_path = None
@@ -465,10 +467,14 @@ if __name__ == "__main__":
465467
466468 logger ("Found application: %s" % foundapps [0 ], 1 )
467469
468- # copy found app to payload folder
470+ # copy or move found app to payload folder
469471 app_name = os .path .basename (foundapps [0 ])
470472 app_path = os .path .join (payload_path , app_name )
471- shutil .copytree (foundapps [0 ], app_path , symlinks = True )
473+ if copy_app :
474+ shutil .copytree (foundapps [0 ], app_path , symlinks = True )
475+ else :
476+ shutil .move (foundapps [0 ], app_path )
477+ 472478
473479 # extract version and other metadata
474480 (app_name , app_identifier , app_version ) = appNameAndVersion (app_path )
0 commit comments