Show
Ignore:
Timestamp:
09/25/07 06:56:58 (6 years ago)
Author:
xvg
Message:

Merge r5865, r5866, r5867, r5870, r5871, r5872, and r5881 from Nmap Umit branch.
Remove .dmp files from share/umit/config. There are files of the same names in share/umit/misc that are more up to date. The ones in config are not mentioned in the manifest.

Remove umit.db from the windows and macosx MANIFEST.in files. Also don't try to
copy umit.db when creating the user config directory. Running as a non-root
user made the copy fail, which caused an attempt to modify the umit.db in
/usr/share/umit/config, which caused a crash. Running as root worked because
the copy of umit.db (implemented by reading the contents then writing them
again) doesn't open the /usr/share database read-only, which creates a
zero-byte file which is then successfully copied. Files should probably be
opened read-only when doing these copies to avoid anomalies like this.

In copy_config_file, open the copied file in read-only mode to avoid accidentally creating it.

Simplify the code that loads icons and make it platform-independent.

Unify the three MANIFEST.in files now that they can be identical.

Install SVG icons on all platforms in the same way. I'm going to try to find the common parts of the setup.pys so that they might be combined.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/umitCore/Paths.py

    r2562 r2617  
    261261    copy_config_file("options.xml", main_dir, user_dir) 
    262262    copy_config_file("profile_editor.xml", main_dir, user_dir) 
    263     copy_config_file("recent_scans.txt", main_dir, user_dir) 
    264263    copy_config_file("scan_profile.usp", main_dir, user_dir) 
    265     copy_config_file("target_list.txt", main_dir, user_dir) 
    266264    copy_config_file("umit_version", main_dir, user_dir) 
    267265    copy_config_file("wizard.xml", main_dir, user_dir) 
     
    281279    if not exists(destiny): 
    282280        # Quick copy 
    283         open(destiny, 'w').write(open(origin).read()) 
     281        origin_file = open(origin, 'r') 
     282        destiny_file = open(destiny, 'w') 
     283        destiny_file.write(origin_file.read()) 
     284        origin_file.close() 
     285        destiny_file.close() 
    284286    return destiny 
    285287