Fix cross-device link error: use shutil.move instead of os.replace
This commit is contained in:
parent
02ec6f81f2
commit
6e2a13d8a3
@ -69,7 +69,7 @@ def run_clip(src, dst, start, duration, mode, lang, model, style, no_subs, quali
|
|||||||
|
|
||||||
# 2. Subtitles (opcijsko)
|
# 2. Subtitles (opcijsko)
|
||||||
if no_subs:
|
if no_subs:
|
||||||
os.replace(reframed, dst)
|
shutil.move(str(reframed), str(dst))
|
||||||
else:
|
else:
|
||||||
cmd = [
|
cmd = [
|
||||||
"python3", str(SCRIPT_DIR / "subtitle.py"),
|
"python3", str(SCRIPT_DIR / "subtitle.py"),
|
||||||
@ -82,7 +82,7 @@ def run_clip(src, dst, start, duration, mode, lang, model, style, no_subs, quali
|
|||||||
r = subprocess.run(cmd)
|
r = subprocess.run(cmd)
|
||||||
if r.returncode != 0:
|
if r.returncode != 0:
|
||||||
print(f"❌ Subtitle napaka — shranim brez", file=sys.stderr)
|
print(f"❌ Subtitle napaka — shranim brez", file=sys.stderr)
|
||||||
os.replace(reframed, dst)
|
shutil.move(str(reframed), str(dst))
|
||||||
return True
|
return True
|
||||||
finally:
|
finally:
|
||||||
import shutil
|
import shutil
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user