rename_file now creates missing directories before renaming

This commit is contained in:
Arvid Norberg 2008-09-30 23:55:45 +00:00
parent ef42e8f77c
commit ba28449765
1 changed files with 1 additions and 0 deletions

View File

@ -587,6 +587,7 @@ namespace libtorrent
// if old path doesn't exist, just rename the file
// in our file_storage, so that when it is created
// it will get the new name
create_directories(new_path.branch_path());
if (exists(old_path)) rename(old_path, new_path);
/*
error_code ec;