|
116 | 116 | shared_memory = None |
117 | 117 |
|
118 | 118 | def running_interactively(): |
| 119 | + import sys |
119 | 120 | main = sys.modules.get("__main__") |
120 | 121 | return ( |
121 | 122 | hasattr(sys, "ps1") or |
@@ -579,8 +580,8 @@ def resource_dir(package_name, filenames): |
579 | 580 | __use_json_name__ = os.path.join(filecfgpath, "foxfile.json") |
580 | 581 | if(__use_ini_file__ and __use_json_file__): |
581 | 582 | __use_json_file__ = False |
582 | | -if('PYFOXFILE_CONFIG_FILE' in os.environ and os.path.exists(os.environ['PYFOXFILE_CONFIG_FILE']) and __use_env_file__): |
583 | | - scriptconf = os.environ['PYFOXFILE_CONFIG_FILE'] |
| 583 | +if('PYARCHIVEFILE_CONFIG_FILE' in os.environ and os.path.exists(os.environ['PYARCHIVEFILE_CONFIG_FILE']) and __use_env_file__): |
| 584 | + scriptconf = os.environ['PYARCHIVEFILE_CONFIG_FILE'] |
584 | 585 | else: |
585 | 586 | prescriptpath = get_importing_script_path() |
586 | 587 | if(prescriptpath is not None): |
@@ -768,6 +769,7 @@ def _get(section_dict, key, default=None): |
768 | 769 | # Fox / Kitsune |
769 | 770 | add_format(__file_format_multi_dict__, "FoxFile", "FoxFile", ".fox", "FoxFile") |
770 | 771 | add_format(__file_format_multi_dict__, "KitsuneFile", "KitsuneFile", ".kitsune", "KitsuneFile") |
| 772 | + add_format(__file_format_multi_dict__, "UwUFile", "UwUFile", ".UwU", "UwUFile") |
771 | 773 | add_format(__file_format_multi_dict__, "キツネファイル", "キツネファイル", ".キツネ", "KitsuneFairu") |
772 | 774 | add_format(__file_format_multi_dict__, "きつねファイル", "きつねファイル", ".きつね", "KitsuneFairu") |
773 | 775 | add_format(__file_format_multi_dict__, "狐ファイル", "狐ファイル", ".狐", "KitsuneFairu") |
@@ -5893,7 +5895,7 @@ def MakeEmptyFilePointer(fp, fmttype=__file_format_default__, checksumtype=["md5 |
5893 | 5895 | return fp |
5894 | 5896 |
|
5895 | 5897 |
|
5896 | | -def MakeEmptyArchiveFilePointer(fp, fmttype=__file_format_default__, checksumtype=["md5", "md5"], formatspecs=__file_format_multi_dict__, saltkey=None): |
| 5898 | +def MakeEmptyFoxFilePointer(fp, fmttype=__file_format_default__, checksumtype=["md5", "md5"], formatspecs=__file_format_multi_dict__, saltkey=None): |
5897 | 5899 | return MakeEmptyFilePointer(fp, fmttype, checksumtype, formatspecs, saltkey) |
5898 | 5900 |
|
5899 | 5901 |
|
@@ -5970,7 +5972,7 @@ def MakeEmptyFile(outfile, fmttype="auto", compression="auto", compresswholefile |
5970 | 5972 | return True |
5971 | 5973 |
|
5972 | 5974 |
|
5973 | | -def MakeEmptyArchiveFile(outfile, compression="auto", compresswholefile=True, compressionlevel=None, compressionuselist=compressionlistalt, checksumtype=["md5", "md5"], formatspecs=__file_format_dict__, saltkey=None, returnfp=False): |
| 5975 | +def MakeEmptyFoxFile(outfile, compression="auto", compresswholefile=True, compressionlevel=None, compressionuselist=compressionlistalt, checksumtype=["md5", "md5"], formatspecs=__file_format_dict__, saltkey=None, returnfp=False): |
5974 | 5976 | return MakeEmptyFile(outfile, "auto", compression, compresswholefile, compressionlevel, compressionuselist, checksumtype, formatspecs, saltkey, returnfp) |
5975 | 5977 |
|
5976 | 5978 |
|
@@ -8594,7 +8596,7 @@ def TarFileToArray(infile, fmttype=__file_format_default__, seekstart=0, seekend |
8594 | 8596 |
|
8595 | 8597 |
|
8596 | 8598 | if(not libarchive_support): |
8597 | | - def BSDTarFileToArray(infile, fmttype=__file_format_default__, seekstart=0, seekend=0, listonly=False, contentasfile=True, skipchecksum=False, formatspecs=__file_format_multi_dict__, seektoend=False, returnfp=False): |
| 8599 | + def BSDTarFileToArray(infile, seekstart=0, seekend=0, listonly=False, contentasfile=True, skipchecksum=False, formatspecs=__file_format_multi_dict__, seektoend=False, returnfp=False): |
8598 | 8600 | return False |
8599 | 8601 |
|
8600 | 8602 | if(libarchive_support): |
@@ -9726,6 +9728,7 @@ def TarFileListFiles(infile, formatspecs=__file_format_multi_dict__, verbose=Fal |
9726 | 9728 | def TarFileListFile(infile, formatspecs=__file_format_multi_dict__, verbose=False, returnfp=False): |
9727 | 9729 | return TarFileListFiles(infile, formatspecs, verbose, returnfp) |
9728 | 9730 |
|
| 9731 | + |
9729 | 9732 | if(not libarchive_support): |
9730 | 9733 | def BSDTarFileListFiles(infile, formatspecs=__file_format_multi_dict__, verbose=False, returnfp=False): |
9731 | 9734 | return False |
@@ -10274,7 +10277,7 @@ def InFileListFiles(infile, fmttype="auto", filestart=0, seekstart=0, seekend=0, |
10274 | 10277 | elif(py7zr_support and checkcompressfile == "7zipfile" and py7zr.is_7zfile(infile)): |
10275 | 10278 | return SevenZipFileListFiles(infile, verbose, returnfp) |
10276 | 10279 | elif('format_magic' in ckformatspecs and checkcompressfile == ckformatspecs['format_magic']): |
10277 | | - return ArchiveFileListFiles(infile, fmttype, filestart, seekstart, seekend, skipchecksum, formatspecs, saltkey, seektoend, verbose, newstyle, returnfp) |
| 10280 | + return FoxFileListFiles(infile, fmttype, filestart, seekstart, seekend, skipchecksum, formatspecs, saltkey, seektoend, verbose, newstyle, returnfp) |
10278 | 10281 | else: |
10279 | 10282 | return BSDTarFileListFiles(infile, formatspecs, verbose, returnfp) |
10280 | 10283 | return False |
|
0 commit comments