Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-03-09 13:52:38 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-03-09 13:52:38 +0400
commit35b9fcb8718d96af9b5c6292ea19bdd64b4b8406 (patch)
tree4c1bb154caed643acf43731d901ed2c6bf21ff4a /source/blender/blenlib/intern/fileops.c
parentedf4855a38e3ee24874431f7c6321f04cb6d1b2f (diff)
comment unused BLI_move() function, also fixed error where it would delete the file even if renaming failed.
- found when testing recursive_operation().
Diffstat (limited to 'source/blender/blenlib/intern/fileops.c')
-rw-r--r--source/blender/blenlib/intern/fileops.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/blenlib/intern/fileops.c b/source/blender/blenlib/intern/fileops.c
index a4caa571bb2..bda67e2eb74 100644
--- a/source/blender/blenlib/intern/fileops.c
+++ b/source/blender/blenlib/intern/fileops.c
@@ -283,6 +283,7 @@ int BLI_delete(const char *file, bool dir, bool recursive)
}
/* Not used anywhere! */
+#if 0
int BLI_move(const char *file, const char *to)
{
int err;
@@ -312,7 +313,7 @@ int BLI_move(const char *file, const char *to)
return err;
}
-
+#endif
int BLI_copy(const char *file, const char *to)
{
@@ -786,6 +787,8 @@ static int copy_single_file(const char *from, const char *to)
return RecursiveOp_Callback_OK;
}
+/* Not used anywhere! */
+#if 0
static int move_callback_pre(const char *from, const char *to)
{
int ret = rename(from, to);
@@ -808,17 +811,17 @@ static int move_single_file(const char *from, const char *to)
/* if *file represents a directory, moves all its contents into *to, else renames
* file itself to *to. */
-/* Not used anywhere! */
int BLI_move(const char *file, const char *to)
{
int ret = recursive_operation(file, to, move_callback_pre, move_single_file, NULL);
- if (ret) {
+ if (ret && ret != -1) {
return recursive_operation(file, NULL, NULL, delete_single_file, delete_callback_post);
}
return ret;
}
+#endif
static char *check_destination(const char *file, const char *to)
{