Deleted Added
full compact
archive_write_set_format_gnutar.c (313570) archive_write_set_format_gnutar.c (342360)
1/*-
2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
3 * Author: Jonas Gastal <jgastal@profusion.mobi>
4 * Copyright (c) 2011-2012 Michihiro NAKAJIMA
5 *
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 325 unchanged lines hidden (view full) ---

334 } else
335#endif
336 p = archive_entry_pathname(entry);
337 /*
338 * On Windows, this is a backup operation just in
339 * case getting WCS failed. On POSIX, this is a
340 * normal operation.
341 */
1/*-
2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
3 * Author: Jonas Gastal <jgastal@profusion.mobi>
4 * Copyright (c) 2011-2012 Michihiro NAKAJIMA
5 *
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 325 unchanged lines hidden (view full) ---

334 } else
335#endif
336 p = archive_entry_pathname(entry);
337 /*
338 * On Windows, this is a backup operation just in
339 * case getting WCS failed. On POSIX, this is a
340 * normal operation.
341 */
342 if (p != NULL && p[strlen(p) - 1] != '/') {
342 if (p != NULL && p[0] != '\0' && p[strlen(p) - 1] != '/') {
343 struct archive_string as;
344
345 archive_string_init(&as);
346 path_length = strlen(p);
347 if (archive_string_ensure(&as,
348 path_length + 2) == NULL) {
349 archive_set_error(&a->archive, ENOMEM,
350 "Can't allocate ustar data");

--- 413 unchanged lines hidden ---
343 struct archive_string as;
344
345 archive_string_init(&as);
346 path_length = strlen(p);
347 if (archive_string_ensure(&as,
348 path_length + 2) == NULL) {
349 archive_set_error(&a->archive, ENOMEM,
350 "Can't allocate ustar data");

--- 413 unchanged lines hidden ---