@@ -438,7 +438,7 @@ int ZipArchive::renameEntry(const ZipEntry& entry, const string& newName) const
438
438
if (newName==entry.getName ()) { return LIBZIPPP_ERROR_INVALID_PARAMETER; }
439
439
440
440
if (entry.isFile ()) {
441
- if (ENTRY_IS_DIRECTORY (newName)) { return LIBZIPPP_ERROR_INVALID_PARAMETER; } // invalid new name
441
+ if (LIBZIPPP_ENTRY_IS_DIRECTORY (newName)) { return LIBZIPPP_ERROR_INVALID_PARAMETER; } // invalid new name
442
442
443
443
int lastSlash = newName.rfind (LIBZIPPP_ENTRY_PATH_SEPARATOR);
444
444
if (lastSlash!=1 ) {
@@ -450,7 +450,7 @@ int ZipArchive::renameEntry(const ZipEntry& entry, const string& newName) const
450
450
if (result==0 ) { return 1 ; }
451
451
return LIBZIPPP_ERROR_UNKNOWN; // renaming was not possible (entry already exists ?)
452
452
} else {
453
- if (!ENTRY_IS_DIRECTORY (newName)) { return LIBZIPPP_ERROR_INVALID_PARAMETER; } // invalid new name
453
+ if (!LIBZIPPP_ENTRY_IS_DIRECTORY (newName)) { return LIBZIPPP_ERROR_INVALID_PARAMETER; } // invalid new name
454
454
455
455
int parentSlash = newName.rfind (LIBZIPPP_ENTRY_PATH_SEPARATOR, newName.length ()-2 );
456
456
if (parentSlash!=-1 ) { // updates the dir hierarchy
@@ -507,7 +507,7 @@ int ZipArchive::renameEntry(const string& e, const string& newName) const {
507
507
bool ZipArchive::addFile (const string& entryName, const string& file) const {
508
508
if (!isOpen ()) { return false ; }
509
509
if (mode==READ_ONLY) { return false ; } // adding not allowed
510
- if (ENTRY_IS_DIRECTORY (entryName)) { return false ; }
510
+ if (LIBZIPPP_ENTRY_IS_DIRECTORY (entryName)) { return false ; }
511
511
512
512
int lastSlash = entryName.rfind (LIBZIPPP_ENTRY_PATH_SEPARATOR);
513
513
if (lastSlash!=-1 ) { // creates the needed parent directories
@@ -537,7 +537,7 @@ bool ZipArchive::addFile(const string& entryName, const string& file) const {
537
537
bool ZipArchive::addData (const string& entryName, const void * data, libzippp_uint64 length, bool freeData) const {
538
538
if (!isOpen ()) { return false ; }
539
539
if (mode==READ_ONLY) { return false ; } // adding not allowed
540
- if (ENTRY_IS_DIRECTORY (entryName)) { return false ; }
540
+ if (LIBZIPPP_ENTRY_IS_DIRECTORY (entryName)) { return false ; }
541
541
542
542
int lastSlash = entryName.rfind (LIBZIPPP_ENTRY_PATH_SEPARATOR);
543
543
if (lastSlash!=-1 ) { // creates the needed parent directories
@@ -560,7 +560,7 @@ bool ZipArchive::addData(const string& entryName, const void* data, libzippp_uin
560
560
bool ZipArchive::addEntry (const string& entryName) const {
561
561
if (!isOpen ()) { return false ; }
562
562
if (mode==READ_ONLY) { return false ; } // adding not allowed
563
- if (!ENTRY_IS_DIRECTORY (entryName)) { return false ; }
563
+ if (!LIBZIPPP_ENTRY_IS_DIRECTORY (entryName)) { return false ; }
564
564
565
565
int nextSlash = entryName.find (LIBZIPPP_ENTRY_PATH_SEPARATOR);
566
566
while (nextSlash!=-1 ) {
0 commit comments