Skip to content

Commit

Permalink
Update FileIO.py
Browse files Browse the repository at this point in the history
  • Loading branch information
SanderVocke authored Apr 30, 2024
1 parent 68eda26 commit bd9c595
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/shoopdaloop/lib/q_objects/FileIO.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import math
import glob
import json
import inspect

from PySide6.QtCore import QObject, Slot, Signal, QThread, QMetaObject, Qt
from PySide6.QtQml import QJSValue
Expand Down Expand Up @@ -106,7 +107,10 @@ def make_tarfile(self, filename, source_dir, compress):
def extract_tarfile(self, filename, target_dir):
flags = "r:*"
with tarfile.open(filename, flags) as tar:
tar.extractall(target_dir, filter='fully_trusted')
if 'filter' in inspect.signature(tar.extractall).signature.parameters:
tar.extractall(target_dir, filter='fully_trusted')
else:
tar.extractall(target_dir)

def save_data_to_soundfile_impl(self, filename, sample_rate, data):
self.startSavingFile.emit()
Expand Down

0 comments on commit bd9c595

Please sign in to comment.