Skip to content

Commit

Permalink
Copy LUT files only
Browse files Browse the repository at this point in the history
  • Loading branch information
ledoge authored May 20, 2021
1 parent 225173a commit 0bd6962
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dwm_lut_injector.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ bool FolderExists(char *path) {
return (attributes != INVALID_FILE_ATTRIBUTES && attributes & FILE_ATTRIBUTE_DIRECTORY);
}

bool CopyFolder(char *source, char *dest) {
bool CopyLUTFolder(char *source, char *dest) {
SHFILEOPSTRUCTA s = {};
s.wFunc = FO_COPY;
s.fFlags = FOF_NO_UI;
s.pTo = dest;

char from[MAX_PATH];
strcpy(from, source);
strcat(from, "\\*");
strcat(from, "\\*" LUT_FILEEXT);
s.pFrom = from;

return !SHFileOperation(&s);
Expand Down Expand Up @@ -150,7 +150,7 @@ int main(int argc, char *argv[]) {
ClearPermissions(lutPath);
} else if (FolderExists(LUT_FOLDER)) {
singleLutMode = false;
if (!CopyFolder(LUT_FOLDER, lutFolderPath)) {
if (!CopyLUTFolder(LUT_FOLDER, lutFolderPath)) {
fprintf(stderr, "Failed to copy " LUT_FOLDER " folder.\n");
return 1;
}
Expand Down

0 comments on commit 0bd6962

Please sign in to comment.