]> git.phdru.name Git - xsetbg.git/commitdiff
Feat(mv): Make paths absolute (and normalize)
authorOleg Broytman <phd@phdru.name>
Wed, 20 Aug 2025 18:05:21 +0000 (21:05 +0300)
committerOleg Broytman <phd@phdru.name>
Wed, 20 Aug 2025 18:05:21 +0000 (21:05 +0300)
mv.py

diff --git a/mv.py b/mv.py
index ce75590d90e86e59ccecac4a8516de3ab372450d..d727f2859c60a9052bca25f8a3215a8bf29d9c81 100755 (executable)
--- a/mv.py
+++ b/mv.py
@@ -31,6 +31,9 @@ if not os.path.exists(from_filename):
 if os.path.exists(to_filename):
     sys.exit("Filename %s already exists, cannot rename" % to_filename)
 
+from_filename = os.path.abspath(from_filename)
+to_filename = os.path.abspath(to_filename)
+
 rows = list(xsetbg_db.selectBy(full_name=from_filename))
 if not rows:
     sys.exit("No rows by filename %s" % from_filename)