josephernest/nfreezer

NFreezer fails if a symbolic link is unresolved

vgivanovic opened this issue · 2 comments

I chose to test NFreezer on my collection of source files pulled (mostly) from GitHub. A lot of them have dangling symlinks which NFreezer doesn't like:

  File "/home/vladimir/anaconda3/bin/nfreezer", line 8, in <module>
    sys.exit(console_script())
  File "/home/vladimir/anaconda3/lib/python3.8/site-packages/nfreezer.py", line 262, in console_script
    backup(src=sys.argv[2], dest=sys.argv[3])
  File "/home/vladimir/anaconda3/lib/python3.8/site-packages/nfreezer.py", line 175, in backup
    mtime = os.stat(fn).st_mtime_ns
FileNotFoundError: [Errno 2] No such file or directory: 'cryptominisat/scripts/xor_to_cnf_class.py'

Restarting NFreezer doesn't help; it fails again at the same place.

Thank you for testing and auditing nFreezer @vgivanovic, this is helpful!

I'll try this too. In your opinion, what should be the expected behaviour when a symlink is unresolved? Skip (with a precise logging) or stop the whole process?