My favorites | Sign in
Project Home Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 3: TODO: zip archive entpacken
1 person starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  Robby@Zeitfuchs.org
Closed:  Jul 2014


 
Project Member Reported by Robby@Zeitfuchs.org, Jun 5, 2013
Processing
zip archive entpacken und analysieren

Jun 5, 2013
Project Member #1 Robby@Zeitfuchs.org
def zip_archive(fileName):
    
    try:
        if zipfile.is_zipfile(fileName) is True:
                                    
            if os.name == 'nt':
                temp_folder = os.curdir + "\\" + fileName[:len(fileName)-4]
            elif os.name == 'posix':
                temp_folder = os.curdir + "/" + fileName[:len(fileName)-4]                
                                        
            if not os.path.exists(temp_folder):
                os.mkdir(temp_folder)
                deflater = zipfile.ZipFile(fileName)
                deflater.printdir()
                deflater.extractall(temp_folder)
                deflater.close()
                
                if directory_scanner(temp_folder) is True:
                    print("Directory Scan Completed Please Look at DirScan.txt\n")
                    return True
                else:
                    print("Directory Scan Failed")
                    return False
            else:
                print("Temp Dir Already Exists")
                return False
            
        else:
            print("Invalid or Corrupted Zip Archive")
            return False
    except:
        print("Generic Error Happened While Deflating Archive")
    
    return True
Jul 5, 2014
Project Member #2 Robby@Zeitfuchs.org
(No comment was entered for this change.)
Status: Fixed

Powered by Google Project Hosting