Fix crash when copying empty folders + misc formatting fixes (#65)

This commit is contained in:
Void 2020-08-09 23:45:52 -05:00 committed by GitHub
parent 7e7ae6159a
commit 96b487781a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 10 deletions

View File

@ -96,7 +96,7 @@ int fcopy(const char *sourcePath, const char *destinationPath)
chdir(sourcePath);
vector<DirEntry> dirContents;
getDirectoryContents(dirContents);
DirEntry* entry = &dirContents.at(1);
DirEntry* entry = NULL;
mkdir(destinationPath, 0777);
for (int i = 1; i < ((int)dirContents.size()); i++) {