Now handles files at the root of the source volume. Fixes bug #1227
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21192 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -241,13 +241,18 @@ CopyEngine::CopyFolder(BDirectory &srcDir, BDirectory &targetDir)
|
||||
BEntry entry;
|
||||
status_t err;
|
||||
while (srcDir.GetNextEntry(&entry) == B_OK) {
|
||||
char name[B_FILE_NAME_LENGTH];
|
||||
entry.GetName(name);
|
||||
if (strcmp(name, PACKAGES_DIRECTORY) == 0)
|
||||
continue;
|
||||
|
||||
StatStruct statbuf;
|
||||
entry.GetStat(&statbuf);
|
||||
|
||||
Undo undo;
|
||||
err = FSCopyFolder(&entry, &targetDir, fControl, NULL, false, undo);
|
||||
if (S_ISDIR(statbuf.st_mode)) {
|
||||
char name[B_FILE_NAME_LENGTH];
|
||||
if (strcmp(name, PACKAGES_DIRECTORY) == 0)
|
||||
continue;
|
||||
err = FSCopyFolder(&entry, &targetDir, fControl, NULL, false, undo);
|
||||
} else {
|
||||
err = FSCopyFile(&entry, &statbuf, &targetDir, fControl, NULL, false, undo);
|
||||
}
|
||||
if (err != B_OK) {
|
||||
BPath path;
|
||||
entry.GetPath(&path);
|
||||
|
||||
Reference in New Issue
Block a user