Skip to content

Commit

Permalink
Delete the output directory
Browse files Browse the repository at this point in the history
  • Loading branch information
ppenenko committed Feb 15, 2025
1 parent 02d1d29 commit f527ff4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import argparse, functools, io, json, os, sys
import argparse, functools, io, json, os, shutil, sys
from pathlib import Path
import multiprocessing as mp
from typing import List, NamedTuple
Expand Down Expand Up @@ -121,7 +121,10 @@ def generate(
if not gltf_dir_path.is_dir():
raise NotADirectoryError(gltf_dir_path)

os.makedirs(out_dir_path, exist_ok = True)
# Delete the output directory in order to delete any stale files
if os.path.exists(out_dir_path):
shutil.rmtree(out_dir_path)
os.makedirs(out_dir_path)

shader_dict = dict()

Expand Down

0 comments on commit f527ff4

Please sign in to comment.