Skip to content

Commit

Permalink
Merge pull request #39 from shoo/enh_move
Browse files Browse the repository at this point in the history
Enhancement of moveFiles to make target directory
  • Loading branch information
shoo authored Nov 28, 2023
2 parents 85587c3 + 09af371 commit b8cb205
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions voile/fs.d
Original file line number Diff line number Diff line change
Expand Up @@ -1514,16 +1514,18 @@ struct FileSystem
//
private bool moveFilesImpl(bool absConvert)(string src, string dst, bool force, bool retrycnt)
{
auto absWork = absolutePath();
auto absSrcDir = .absolutePath(src, absWork).buildNormalizedPath();
auto absTargetDir = .absolutePath(dst, absWork).buildNormalizedPath();
return moveFilesImpl!false(absSrcDir, absTargetDir, force, retrycnt);
auto absWork = absolutePath();
auto absSrc = .absolutePath(src, absWork).buildNormalizedPath();
auto absTarget = .absolutePath(dst, absWork).buildNormalizedPath();
return moveFilesImpl!false(absSrc, absTarget, force, retrycnt);
}
//
private bool moveFilesImpl(bool absConvert: false)(string src, string dst, bool force, bool retrycnt)
{
if (!src.exists)
return true;
if (!dst.dirName.exists)
mkdirRecurse(dst.dirName);
version (Windows)
{
if (src.driveName == dst.driveName)
Expand Down

0 comments on commit b8cb205

Please sign in to comment.