mirror of
https://github.com/ProjectLeonida/mandy.git
synced 2026-12-06 09:08:38 +00:00
anim_clips: ask report_paths for the report-path guard
This commit is contained in:
committed by
Jan Trencansky
parent
0c2eec6d99
commit
0921fedb76
@ -45,6 +45,7 @@ import anim_index # noqa: E402
|
||||
from file_mode import published_mode # noqa: E402
|
||||
from pool_workers import process_workers # noqa: E402
|
||||
from replace_retry import replace as replace_retry # noqa: E402
|
||||
from report_paths import same_report_path # noqa: E402
|
||||
|
||||
SYSTEM = 0x50000000
|
||||
CHANNEL_NAMES = ("static_quat", "static_vec3", "static_float", "raw_float", "quantize_float",
|
||||
@ -1522,14 +1523,7 @@ def decode_one(path, offset, frames):
|
||||
return d
|
||||
|
||||
|
||||
def same_output_path(first, second):
|
||||
"""True when writing ``second`` would truncate ``first`` (same file, path or hard link)."""
|
||||
if os.path.normcase(os.path.realpath(first)) == os.path.normcase(os.path.realpath(second)):
|
||||
return True
|
||||
try:
|
||||
return os.path.samefile(first, second)
|
||||
except OSError:
|
||||
return False
|
||||
same_output_path = same_report_path # True when writing the second would truncate the first
|
||||
|
||||
|
||||
def main():
|
||||
|
||||
Reference in New Issue
Block a user