allow non symlinks filesystem for tar-backup

This commit is contained in:
Q
2025-11-06 21:57:24 +02:00
parent b7ddf33ab5
commit 4cc86da8f4

View File

@@ -9,7 +9,7 @@ import subprocess
import sys
from argparse import ArgumentParser
VERSION = "0.1.1"
VERSION = "0.1.2"
class TB:
def __init__(self, options):
@@ -99,7 +99,11 @@ class TB:
except Exception:
pass
if os.path.exists(os.path.join(self.base_folder, self.backup_folder)):
try:
os.symlink(self.backup_folder, os.path.join(self.base_folder, folder))
except OSError:
with open(os.path.join(self.base_folder, folder), 'wt') as fp:
fp.write(self.backup_folder)
def make_backup(self):
if self.options.no_backup: