@@ -197,7 +197,7 @@ def set_extra_attributes_from_keyword_args(self, **kwargs):
197197
198198 def extract (self , ex_path , version ):
199199 if os .path .exists (ex_path ):
200- shutil .rmtree (ex_path , ignore_errors = True )
200+ utils .rmtree (ex_path , ignore_errors = True )
201201
202202 path = self .save_file_path (version )
203203
@@ -225,8 +225,8 @@ def extract(self, ex_path, version):
225225 if os .path .exists (dir_name ):
226226 for p in os .listdir (dir_name ):
227227 abs_file = utils .path_join (dir_name , p )
228- shutil .move (abs_file , ex_path )
229- shutil .rmtree (dir_name , ignore_errors = True )
228+ utils .move (abs_file , ex_path )
229+ utils .rmtree (dir_name , ignore_errors = True )
230230
231231 def get_file_bytes (self , version ):
232232 fbytes = []
@@ -637,7 +637,7 @@ def create_icns_for_app(self, icns_path):
637637 if not icon_path .endswith ('.icns' ):
638638 save_icns (icon_path , icns_path )
639639 else :
640- shutil .copy (icon_path , icns_path )
640+ utils .copy (icon_path , icns_path )
641641
642642 def replace_icon_in_exe (self , exe_path ):
643643 icon_setting = self .get_setting ('icon' )
@@ -658,11 +658,11 @@ def make_output_dirs(self):
658658
659659 output_dir = utils .path_join (self .output_dir (), self .project_name ())
660660 if os .path .exists (output_dir ):
661- shutil .rmtree (output_dir , ignore_errors = True )
661+ utils .rmtree (output_dir , ignore_errors = True )
662662
663663 temp_dir = utils .path_join (TEMP_DIR , 'webexectemp' )
664664 if os .path .exists (temp_dir ):
665- shutil .rmtree (temp_dir , ignore_errors = True )
665+ utils .rmtree (temp_dir , ignore_errors = True )
666666
667667 self .progress_text = 'Making new directories...\n '
668668
@@ -689,8 +689,8 @@ def make_output_dirs(self):
689689
690690 app_nw_folder = utils .path_join (temp_dir , self .project_name ()+ '.nwf' )
691691
692- shutil .copytree (self .project_dir (), app_nw_folder ,
693- ignore = shutil .ignore_patterns (output_dir ))
692+ utils .copytree (self .project_dir (), app_nw_folder ,
693+ ignore = shutil .ignore_patterns (output_dir ))
694694
695695 zip_files (zip_file , self .project_dir (), exclude_paths = [output_dir ])
696696 for ex_setting in self .settings ['export_settings' ].values ():
@@ -706,13 +706,13 @@ def make_output_dirs(self):
706706 export_dest = export_dest .replace ('node-webkit' , 'nwjs' )
707707
708708 if os .path .exists (export_dest ):
709- shutil .rmtree (export_dest , ignore_errors = True )
709+ utils .rmtree (export_dest , ignore_errors = True )
710710
711711 # shutil will make the directory for us
712- shutil .copytree (get_data_path ('files/' + ex_setting .name ),
713- export_dest ,
712+ utils .copytree (get_data_path ('files/' + ex_setting .name ),
713+ export_dest ,
714714 ignore = shutil .ignore_patterns ('place_holder.txt' ))
715- shutil .rmtree (get_data_path ('files/' + ex_setting .name ), ignore_errors = True )
715+ utils .rmtree (get_data_path ('files/' + ex_setting .name ), ignore_errors = True )
716716 self .progress_text += '.'
717717
718718 if 'mac' in ex_setting .name :
@@ -722,13 +722,13 @@ def make_output_dirs(self):
722722 self .project_name ()+ '.app' )
723723
724724 try :
725- shutil .move (utils .path_join (export_dest ,
725+ utils .move (utils .path_join (export_dest ,
726726 'nwjs.app' ),
727- app_path )
727+ app_path )
728728 except IOError :
729- shutil .move (utils .path_join (export_dest ,
729+ utils .move (utils .path_join (export_dest ,
730730 'node-webkit.app' ),
731- app_path )
731+ app_path )
732732
733733 plist_path = utils .path_join (app_path , 'Contents' , 'Info.plist' )
734734
@@ -751,9 +751,9 @@ def make_output_dirs(self):
751751 'app.nw' )
752752
753753 if uncompressed :
754- shutil .copytree (app_nw_folder , app_nw_res )
754+ utils .copytree (app_nw_folder , app_nw_res )
755755 else :
756- shutil .copy (zip_file , app_nw_res )
756+ utils .copy (zip_file , app_nw_res )
757757 self .create_icns_for_app (utils .path_join (app_path ,
758758 'Contents' ,
759759 'Resources' ,
@@ -802,13 +802,13 @@ def make_output_dirs(self):
802802 self .logger .error (error )
803803 self .output_err += error
804804 finally :
805- shutil .rmtree (temp_dir , ignore_errors = True )
805+ utils .rmtree (temp_dir , ignore_errors = True )
806806
807807 def make_desktop_file (self , nw_path , export_dest ):
808808 icon_set = self .get_setting ('icon' )
809809 icon_path = utils .path_join (self .project_dir (), icon_set .value )
810810 if os .path .exists (icon_path ) and icon_set .value :
811- shutil .copy (icon_path , export_dest )
811+ utils .copy (icon_path , export_dest )
812812 icon_path = utils .path_join (export_dest , os .path .basename (icon_path ))
813813 else :
814814 icon_path = ''
@@ -886,7 +886,7 @@ def copy_files_to_project_folder(self):
886886 f_path = setting .value .replace (self .project_dir (), '' )
887887 if os .path .isabs (f_path ):
888888 try :
889- shutil .copy (setting .value , self .project_dir ())
889+ utils .copy (setting .value , self .project_dir ())
890890 self .logger .info (u'Copying file {} to {}' .format (setting .value , self .project_dir ()))
891891 except shutil .Error as e : # same file warning
892892 self .logger .warning (u'Warning: {}' .format (e ))
0 commit comments