aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Mower <mowerm@gmail.com>2015-12-24 10:57:39 -0600
committerMatt Mower <mowerm@gmail.com>2015-12-24 11:06:58 -0600
commit9d909bac629d1f5127966091e3353f0950fad48d (patch)
tree457637d8464d7e4e82336f40724a73a65690d6cf
parentb9ffe8e520bb23dfbc57441a0aa505133e70438b (diff)
parent0514eff761006d4b6695e67f6f3a6ebb514766f3 (diff)
downloadandroid_external_exfat-stable/cm-13.0-ZNH0E.tar.gz
android_external_exfat-stable/cm-13.0-ZNH0E.tar.bz2
android_external_exfat-stable/cm-13.0-ZNH0E.zip
Merge tag 'v1.2.3' into HEADstable/cm-13.0-ZNH0E
Change-Id: I9564731ef38f65fc044bfa3e1e6de91cb3c13ea8
-rw-r--r--ChangeLog4
-rw-r--r--configure.ac2
-rw-r--r--libexfat/android_config.h6
-rw-r--r--libexfat/node.c10
4 files changed, 18 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index d6f99d0..05cd191 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+1.2.3 (2015-12-19)
+
+* Fixed clusters loss when file renaming replaces target.
+
1.2.2 (2015-11-09)
* Improved reliability in case of a sudden unplug: FS will be in a clean state
diff --git a/configure.ac b/configure.ac
index 527986b..3f15aac 100644
--- a/configure.ac
+++ b/configure.ac
@@ -21,7 +21,7 @@
#
AC_INIT([Free exFAT implementation],
- [1.2.2],
+ [1.2.3],
[relan@users.noreply.github.com],
[exfat],
[https://github.com/relan/exfat])
diff --git a/libexfat/android_config.h b/libexfat/android_config.h
index 09c3346..8587913 100644
--- a/libexfat/android_config.h
+++ b/libexfat/android_config.h
@@ -11,7 +11,7 @@
#define PACKAGE_NAME "Free exFAT implementation"
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "Free exFAT implementation 1.2.2"
+#define PACKAGE_STRING "Free exFAT implementation 1.2.3"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "exfat"
@@ -20,10 +20,10 @@
#define PACKAGE_URL "https://github.com/relan/exfat"
/* Define to the version of this package. */
-#define PACKAGE_VERSION "1.2.2"
+#define PACKAGE_VERSION "1.2.3"
/* Version number of package */
-#define VERSION "1.2.2"
+#define VERSION "1.2.3"
/* Enable large inode numbers on Mac OS X 10.5. */
#ifndef _DARWIN_USE_64_BIT_INODE
diff --git a/libexfat/node.c b/libexfat/node.c
index d05f20d..4dd4dc6 100644
--- a/libexfat/node.c
+++ b/libexfat/node.c
@@ -1130,6 +1130,16 @@ int exfat_rename(struct exfat* ef, const char* old_path, const char* new_path)
exfat_put_node(ef, existing);
if (rc != 0)
{
+ /* free clusters even if something went wrong; overwise they
+ will be just lost */
+ exfat_cleanup_node(ef, existing);
+ exfat_put_node(ef, dir);
+ exfat_put_node(ef, node);
+ return rc;
+ }
+ rc = exfat_cleanup_node(ef, existing);
+ if (rc != 0)
+ {
exfat_put_node(ef, dir);
exfat_put_node(ef, node);
return rc;