copy using os call if python<3.14
This commit is contained in:
parent
e730ed5eb3
commit
878f740bde
|
|
@ -1,5 +1,6 @@
|
|||
import argparse
|
||||
from pathlib import Path
|
||||
import os
|
||||
|
||||
|
||||
SAFETY = 'jellyfin'
|
||||
|
|
@ -62,7 +63,10 @@ def create_new_links(source: Path, dest: Path, dry: bool):
|
|||
if dry:
|
||||
print(f"Create file: {new_file}")
|
||||
else:
|
||||
try:
|
||||
file.copy(new_file)
|
||||
except AttributeError:
|
||||
os.system(f"cp --reflink {file} {new_file}")
|
||||
|
||||
if __name__ == '__main__':
|
||||
args = get_args()
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user