mkaramb commited on
Commit
37bfbd1
·
verified ·
1 Parent(s): 6a3411e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -8,8 +8,10 @@ def unzip_file(file):
8
  jpg_files = [] # List to store paths of JPG files
9
  with zipfile.ZipFile(file, "r") as zip_ref:
10
  zip_ref.extractall(extract_path) # Extract files into the specified directory
11
- # Walk through the directory structure and look for JPG files
12
  for root, dirs, files in os.walk(extract_path):
 
 
13
  for file in files:
14
  if file.lower().endswith('.jpg'): # Check if the file is a JPG
15
  full_path = os.path.join(root, file)
 
8
  jpg_files = [] # List to store paths of JPG files
9
  with zipfile.ZipFile(file, "r") as zip_ref:
10
  zip_ref.extractall(extract_path) # Extract files into the specified directory
11
+ # Walk through the directory structure and look for JPG files, ignoring __MACOSX directory
12
  for root, dirs, files in os.walk(extract_path):
13
+ if '__MACOSX' in root: # Skip the __MACOSX directory
14
+ continue
15
  for file in files:
16
  if file.lower().endswith('.jpg'): # Check if the file is a JPG
17
  full_path = os.path.join(root, file)