edir 2.37__tar.gz → 2.38__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: edir
3
- Version: 2.37
3
+ Version: 2.38
4
4
  Summary: Utility to rename, remove, and copy files/dirs using your editor
5
5
  Author-email: Mark Blakeney <mark.blakeney@bullet-systems.net>
6
6
  License-Expression: GPL-3.0-or-later
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: edir
3
- Version: 2.37
3
+ Version: 2.38
4
4
  Summary: Utility to rename, remove, and copy files/dirs using your editor
5
5
  Author-email: Mark Blakeney <mark.blakeney@bullet-systems.net>
6
6
  License-Expression: GPL-3.0-or-later
@@ -0,0 +1,8 @@
1
+ {
2
+ "tag": "2.38",
3
+ "distance": 0,
4
+ "node": "g5bc1ed380872c4add2537f7bb63692d4c4c65ca6",
5
+ "dirty": false,
6
+ "branch": "main",
7
+ "node_date": "2026-06-30"
8
+ }
@@ -289,7 +289,7 @@ class Fpath:
289
289
  tempdirs = set()
290
290
  natsort_key: Callable
291
291
 
292
- def __init__(self, path: Path):
292
+ def __init__(self, path: Path) -> None:
293
293
  "Class constructor"
294
294
  self.path = path
295
295
  self.newpath = None
@@ -312,14 +312,18 @@ class Fpath:
312
312
  self.diagrepr += SEP
313
313
 
314
314
  @staticmethod
315
- def inc_path(path: Path) -> Path:
315
+ def inc_path(path: Path, check_list: list[Path] | None = None) -> Path:
316
316
  "Find next unique file name"
317
317
  # Iterate forever, there can only be a finite number of existing
318
318
  # paths
319
+ if check_list is None:
320
+ check_list = []
321
+
319
322
  name = path.name
320
323
  for c in itertools.count():
321
- if not path.is_symlink() and not path.exists():
324
+ if not path.is_symlink() and not path.exists() and path not in check_list:
322
325
  break
326
+
323
327
  path = path.with_name(args._copy_name(name, c))
324
328
 
325
329
  return path
@@ -545,8 +549,7 @@ class Fpath:
545
549
  newpath = Path(pathstr)
546
550
 
547
551
  if path.newpath:
548
- if path.changed(newpath) and newpath not in path.copies:
549
- path.copies.append(newpath)
552
+ path.copies.append(cls.inc_path(newpath, path.copies))
550
553
  else:
551
554
  path.newpath = newpath
552
555
 
@@ -1,8 +0,0 @@
1
- {
2
- "tag": "2.37",
3
- "distance": 0,
4
- "node": "gf381879c1743e43f4d5c9b185ee48917a74b7ebe",
5
- "dirty": false,
6
- "branch": "main",
7
- "node_date": "2026-06-23"
8
- }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes