@@ -53,6 +53,7 @@ def __init__(self, path=None):
53
53
self .path = path
54
54
if self .path and exists (self .path ):
55
55
self .filename = split (path )[1 ]
56
+ self .folder = split (split (path )[0 ])[1 ]
56
57
else :
57
58
self .filename = None
58
59
# The status of the region file.
@@ -92,7 +93,7 @@ def __init__(self, path, scanned_time=None):
92
93
# general region file info
93
94
self .path = path
94
95
self .filename = split (path )[1 ]
95
- self .folder = split (path )[0 ]
96
+ self .folder = split (split ( path )[0 ])[ 1 ]
96
97
self .x = self .z = None
97
98
self .x , self .z = self .get_coords ()
98
99
self .coords = (self .x , self .z )
@@ -393,19 +394,19 @@ def fix_problematic_chunks(self, status):
393
394
if len (cdata ) == len (raw_chunk ):
394
395
# the chunk is probably good, write it in the region file
395
396
region_file .write_blockdata (local_coords [0 ], local_coords [1 ], out )
396
- print ("The chunk {0},{1} in region file {2} was fixed successfully." .format (local_coords [0 ], local_coords [1 ], self .filename ))
397
+ print ("The chunk {0},{1} in region file {2} was fixed successfully." .format (local_coords [0 ], local_coords [1 ], join ( self .folder , self . filename ) ))
397
398
else :
398
- print ("The chunk {0},{1} in region file {2} couldn't be fixed." .format (local_coords [0 ], local_coords [1 ], self .filename ))
399
+ print ("The chunk {0},{1} in region file {2} couldn't be fixed." .format (local_coords [0 ], local_coords [1 ], join ( self .folder , self . filename ) ))
399
400
#=======================================================
400
401
# print("Extracted: " + str(len(out)))
401
402
# print("Size of the compressed stream: " + str(len(raw_chunk)))
402
403
#=======================================================
403
404
except region .ChunkHeaderError :
404
405
# usually a chunk with zero length, pass
405
- print ("The chunk {0},{1} in region file {2} couldn't be fixed." .format (local_coords [0 ], local_coords [1 ], self .filename ))
406
+ print ("The chunk {0},{1} in region file {2} couldn't be fixed." .format (local_coords [0 ], local_coords [1 ], join ( self .folder , self . filename ) ))
406
407
except region .RegionHeaderError :
407
408
# usually a chunk with zero length, pass
408
- print ("The chunk {0},{1} in region file {2} couldn't be fixed." .format (local_coords [0 ], local_coords [1 ], self .filename ))
409
+ print ("The chunk {0},{1} in region file {2} couldn't be fixed." .format (local_coords [0 ], local_coords [1 ], join ( self .folder , self . filename ) ))
409
410
410
411
if status == c .CHUNK_MISSING_ENTITIES_TAG :
411
412
# The arguments to create the empty TAG_List have been somehow extracted by comparing
0 commit comments