summaryrefslogtreecommitdiffstats
path: root/exfat/libexfat
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--exfat/libexfat/byteorder.h2
-rw-r--r--exfat/libexfat/cluster.c2
-rw-r--r--exfat/libexfat/exfat.h2
-rw-r--r--exfat/libexfat/exfatfs.h2
-rw-r--r--exfat/libexfat/log.c2
-rw-r--r--exfat/libexfat/lookup.c2
-rw-r--r--exfat/libexfat/mount.c2
-rw-r--r--exfat/libexfat/node.c21
-rw-r--r--exfat/libexfat/time.c2
-rw-r--r--exfat/libexfat/utf.c2
-rw-r--r--exfat/libexfat/utils.c2
-rw-r--r--exfat/libexfat/version.h8
12 files changed, 33 insertions, 16 deletions
diff --git a/exfat/libexfat/byteorder.h b/exfat/libexfat/byteorder.h
index 4850efb3d..6792f37c0 100644
--- a/exfat/libexfat/byteorder.h
+++ b/exfat/libexfat/byteorder.h
@@ -2,7 +2,7 @@
byteorder.h (12.01.10)
Endianness stuff. exFAT uses little-endian byte order.
- Copyright (C) 2010-2012 Andrew Nayenko
+ Copyright (C) 2010-2013 Andrew Nayenko
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/exfat/libexfat/cluster.c b/exfat/libexfat/cluster.c
index cb3e87165..83c983da4 100644
--- a/exfat/libexfat/cluster.c
+++ b/exfat/libexfat/cluster.c
@@ -2,7 +2,7 @@
cluster.c (03.09.09)
exFAT file system implementation library.
- Copyright (C) 2010-2012 Andrew Nayenko
+ Copyright (C) 2010-2013 Andrew Nayenko
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/exfat/libexfat/exfat.h b/exfat/libexfat/exfat.h
index 6f152670d..11be06f7b 100644
--- a/exfat/libexfat/exfat.h
+++ b/exfat/libexfat/exfat.h
@@ -3,7 +3,7 @@
Definitions of structures and constants used in exFAT file system
implementation.
- Copyright (C) 2010-2012 Andrew Nayenko
+ Copyright (C) 2010-2013 Andrew Nayenko
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/exfat/libexfat/exfatfs.h b/exfat/libexfat/exfatfs.h
index 5a8e39fda..6c58a842a 100644
--- a/exfat/libexfat/exfatfs.h
+++ b/exfat/libexfat/exfatfs.h
@@ -2,7 +2,7 @@
exfatfs.h (29.08.09)
Definitions of structures and constants used in exFAT file system.
- Copyright (C) 2010-2012 Andrew Nayenko
+ Copyright (C) 2010-2013 Andrew Nayenko
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/exfat/libexfat/log.c b/exfat/libexfat/log.c
index 8b589b406..034cc09f4 100644
--- a/exfat/libexfat/log.c
+++ b/exfat/libexfat/log.c
@@ -2,7 +2,7 @@
log.c (02.09.09)
exFAT file system implementation library.
- Copyright (C) 2010-2012 Andrew Nayenko
+ Copyright (C) 2010-2013 Andrew Nayenko
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/exfat/libexfat/lookup.c b/exfat/libexfat/lookup.c
index 8c889b2b2..2e1aa8184 100644
--- a/exfat/libexfat/lookup.c
+++ b/exfat/libexfat/lookup.c
@@ -2,7 +2,7 @@
lookup.c (02.09.09)
exFAT file system implementation library.
- Copyright (C) 2010-2012 Andrew Nayenko
+ Copyright (C) 2010-2013 Andrew Nayenko
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/exfat/libexfat/mount.c b/exfat/libexfat/mount.c
index 44fb58138..4daf12668 100644
--- a/exfat/libexfat/mount.c
+++ b/exfat/libexfat/mount.c
@@ -2,7 +2,7 @@
mount.c (22.10.09)
exFAT file system implementation library.
- Copyright (C) 2010-2012 Andrew Nayenko
+ Copyright (C) 2010-2013 Andrew Nayenko
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/exfat/libexfat/node.c b/exfat/libexfat/node.c
index bacb01d10..ff2cea9ab 100644
--- a/exfat/libexfat/node.c
+++ b/exfat/libexfat/node.c
@@ -2,7 +2,7 @@
node.c (09.10.09)
exFAT file system implementation library.
- Copyright (C) 2010-2012 Andrew Nayenko
+ Copyright (C) 2010-2013 Andrew Nayenko
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -486,7 +486,7 @@ void exfat_reset_cache(struct exfat* ef)
reset_cache(ef, ef->root);
}
-void next_entry(struct exfat* ef, const struct exfat_node* parent,
+static void next_entry(struct exfat* ef, const struct exfat_node* parent,
cluster_t* cluster, off64_t* offset)
{
*offset += sizeof(struct exfat_entry);
@@ -908,6 +908,23 @@ int exfat_rename(struct exfat* ef, const char* old_path, const char* new_path)
exfat_put_node(ef, node);
return rc;
}
+
+ /* check that target is not a subdirectory of the source */
+ if (node->flags & EXFAT_ATTRIB_DIR)
+ {
+ struct exfat_node* p;
+
+ for (p = dir; p; p = p->parent)
+ if (node == p)
+ {
+ if (existing != NULL)
+ exfat_put_node(ef, existing);
+ exfat_put_node(ef, dir);
+ exfat_put_node(ef, node);
+ return -EINVAL;
+ }
+ }
+
if (existing != NULL)
{
/* remove target if it's not the same node as source */
diff --git a/exfat/libexfat/time.c b/exfat/libexfat/time.c
index 890930eac..10a826a99 100644
--- a/exfat/libexfat/time.c
+++ b/exfat/libexfat/time.c
@@ -2,7 +2,7 @@
time.c (03.02.12)
exFAT file system implementation library.
- Copyright (C) 2010-2012 Andrew Nayenko
+ Copyright (C) 2010-2013 Andrew Nayenko
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/exfat/libexfat/utf.c b/exfat/libexfat/utf.c
index 983c7930b..fd16fe964 100644
--- a/exfat/libexfat/utf.c
+++ b/exfat/libexfat/utf.c
@@ -2,7 +2,7 @@
utf.c (13.09.09)
exFAT file system implementation library.
- Copyright (C) 2010-2012 Andrew Nayenko
+ Copyright (C) 2010-2013 Andrew Nayenko
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/exfat/libexfat/utils.c b/exfat/libexfat/utils.c
index 14b4791fe..499833b50 100644
--- a/exfat/libexfat/utils.c
+++ b/exfat/libexfat/utils.c
@@ -2,7 +2,7 @@
utils.c (04.09.09)
exFAT file system implementation library.
- Copyright (C) 2010-2012 Andrew Nayenko
+ Copyright (C) 2010-2013 Andrew Nayenko
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/exfat/libexfat/version.h b/exfat/libexfat/version.h
index f35cb4fdf..b795e9159 100644
--- a/exfat/libexfat/version.h
+++ b/exfat/libexfat/version.h
@@ -2,7 +2,7 @@
version.h (12.06.10)
Version constants.
- Copyright (C) 2010-2012 Andrew Nayenko
+ Copyright (C) 2010-2013 Andrew Nayenko
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -21,8 +21,8 @@
#ifndef VERSION_H_INCLUDED
#define VERSION_H_INCLUDED
-#define EXFAT_VERSION_MAJOR 0
-#define EXFAT_VERSION_MINOR 9
-#define EXFAT_VERSION_PATCH 8
+#define EXFAT_VERSION_MAJOR 1
+#define EXFAT_VERSION_MINOR 0
+#define EXFAT_VERSION_PATCH 0
#endif /* ifndef VERSION_H_INCLUDED */