Rectified handling of oversized filenames by new API calls:
iso_image_set_truncate_mode, iso_image_get_truncate_mode, iso_truncate_leaf_name, iso_image_set_node_name, iso_image_tree_clone, iso_image_add_new_dir, iso_image_add_new_file, iso_image_add_new_special, iso_image_add_new_symlink, iso_image_dir_get_node, iso_image_path_to_node,
This commit is contained in:
@ -160,6 +160,20 @@ struct Iso_Image
|
||||
/* TODO
|
||||
enum iso_replace_mode (*confirm_replace)(IsoFileSource *src, IsoNode *node);
|
||||
*/
|
||||
|
||||
/**
|
||||
* What to do in case of name longer than truncate_length:
|
||||
* 0= throw FAILURE
|
||||
* 1= truncate to truncate_length with MD5 of whole name at end
|
||||
*/
|
||||
int truncate_mode;
|
||||
int truncate_length;
|
||||
|
||||
/**
|
||||
* This is a convenience buffer for name truncation during image
|
||||
* manipulation where libisofs is not thread-safe anyway.
|
||||
*/
|
||||
char truncate_buffer[4096];
|
||||
|
||||
/**
|
||||
* When this is not NULL, it is a pointer to a function that will
|
||||
@ -230,6 +244,14 @@ struct Iso_Image
|
||||
};
|
||||
|
||||
|
||||
/* Apply truncation mode to name, using image->truncate_buffer to perform
|
||||
truncation if needed.
|
||||
|
||||
Warning: Not thread-safe !
|
||||
*/
|
||||
int iso_image_truncate_name(IsoImage *image, const char *name, char **namept,
|
||||
int flag);
|
||||
|
||||
|
||||
/* Collect the bitmap of used inode numbers in the range of
|
||||
_ImageFsData.used_inodes_start + ISO_USED_INODE_RANGE
|
||||
|
Reference in New Issue
Block a user