Cleanup and update NEWS
authorEric Biggers <ebiggers3@gmail.com>
Mon, 20 May 2013 19:00:47 +0000 (14:00 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Mon, 20 May 2013 19:00:47 +0000 (14:00 -0500)
NEWS
include/wimlib.h
src/dentry.c
src/extract.c
src/metadata_resource.c

diff --git a/NEWS b/NEWS
index f7b4628..570bfe1 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,23 @@
 Only the most important changes more recent than version 0.6 are noted here.
 
+Version 1.4.1:
+       Paths given to wimlib-imagex on Windows are now treated case
+       insensitively.
+
+       Improved behavior regarding invalid filenames; in particular, on
+       Windows, wimlib-imagex will, when extracting, now omit (with an option
+       to override this default) filenames differing only in case, or filenames
+       containing characters not valid on Windows.
+
+       `wimlib-imagex update' now acquires proper privileges on Windows when
+       running as an Administrator.
+
+       `wimlib-imagex update' will now complain if no image is specified when
+       trying to update a multi-image WIM.
+
+       wimlib-imagex will now choose different units for progress messages,
+       depending on the amount of data that needs to be processed.
+
 Version 1.4.0:
        Added new "extract" and "update" subcommands to wimlib-imagex, along
        with associated APIs in the library.  These commands are intended mainly
index 02f7473..7547b7c 100644 (file)
@@ -729,9 +729,9 @@ struct wimlib_capture_config {
 #define WIMLIB_EXTRACT_FLAG_REPLACE_INVALID_FILENAMES  0x00000800
 
 /** On Windows, when there exist two or more files with the same case
- * insensitive name (but different case sensitive names), try to extract them
- * all by appending junk to the end of them, rather than extracting an
- * arbitrarily only one.  */
+ * insensitive name but different case sensitive names, try to extract them all
+ * by appending junk to the end of them, rather than arbitrarily extracting only
+ * one. */
 #define WIMLIB_EXTRACT_FLAG_ALL_CASE_CONFLICTS         0x00001000
 
 /******************************
index abe5095..d7f1899 100644 (file)
@@ -479,9 +479,8 @@ calculate_subdir_offsets(struct wim_dentry *dentry, u64 *subdir_offset_p)
        }
 }
 
-/* UNIX: Case-sensitive UTF-16LE dentry or stream name comparison.  We call this
- * on Windows as well to distinguish true duplicates from names differing by
- * case only. */
+/* Case-sensitive UTF-16LE dentry or stream name comparison.  Used on both UNIX
+ * (always) and Windows (sometimes) */
 static int
 compare_utf16le_names_case_sensitive(const utf16lechar *name1, size_t nbytes1,
                                     const utf16lechar *name2, size_t nbytes2)
index 5c6c38a..d4029ef 100644 (file)
@@ -446,6 +446,7 @@ file_name_valid(utf16lechar *name, size_t num_chars, bool fix)
                }
        }
 
+#ifdef __WIN32__
        if (name[num_chars - 1] == cpu_to_le16(' ') ||
            name[num_chars - 1] == cpu_to_le16('.'))
        {
@@ -454,6 +455,7 @@ file_name_valid(utf16lechar *name, size_t num_chars, bool fix)
                else
                        return false;
        }
+#endif
        return true;
 }
 
@@ -566,12 +568,14 @@ out_replace:
        #endif
                size_t fixed_name_num_chars = tchar_nchars;
                tchar fixed_name[tchar_nchars + 50];
-               size_t extraction_name_nbytes;
 
                tmemcpy(fixed_name, tchar_name, tchar_nchars);
                fixed_name_num_chars += tsprintf(fixed_name + tchar_nchars,
                                                 T(" (invalid filename #%lu)"),
                                                 ++args->invalid_sequence);
+       #ifndef __WIN32__
+               FREE(tchar_name);
+       #endif
                dentry->extraction_name = memdup(fixed_name, 2 * fixed_name_num_chars + 2);
                if (!dentry->extraction_name)
                        return WIMLIB_ERR_NOMEM;
index 13aa5b8..041d1f7 100644 (file)
@@ -101,8 +101,7 @@ read_metadata_resource(WIMStruct *wim, struct wim_image_metadata *imd)
                goto out_free_buf;
 
        sha1_buffer(buf, metadata_len, hash);
-       if (!hashes_equal(metadata_lte->hash, hash))
-       {
+       if (!hashes_equal(metadata_lte->hash, hash)) {
                ERROR("Metadata resource is corrupted (invalid SHA-1 message digest)!");
                ret = WIMLIB_ERR_INVALID_RESOURCE_HASH;
                goto out_free_buf;