-
Notifications
You must be signed in to change notification settings - Fork 1
Improve create placeholder #199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| inline static LARGE_INTEGER FileTimeToLargeInteger(_In_ const FILETIME fileTime) | ||
| { | ||
| inline static LARGE_INTEGER JsTimestampToLargeInteger(int64_t jsTimestamp) { | ||
| const int64_t EPOCH_DIFFERENCE = 11644473600000LL; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was done in a function in javascript:
private convertToWindowsTime(jsTime: number) {
return BigInt(jsTime) * 10000n + 116444736000000000n;
}However, now we move all conversations from the date number in javascript to C++.
| return result; | ||
| } | ||
|
|
||
| if (isDirectory) // TODO: the function createEntry is used to create only folders (directories), so this if is always true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here we have just removed the if as the TODO says. This was just used only for folders.
| L"Unable to free up space because the file is currently in use.\nPlease close the file and try again.", | ||
| L"File in use", | ||
| MB_OK | MB_ICONWARNING | MB_SYSTEMMODAL); | ||
| // MessageBoxW( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was the MessageBox displayed when a file was in used, however, currently we have some files that are locked and this MessageBox is displayed everytime. This error is already in prod, for now we just log it and ignore.
| @@ -1,93 +1,25 @@ | |||
| #include <Windows.h> | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here we just replace all parse values with the new template napi_extract_args and convert the datetime values to a windows format (LARGE_INTEGER).
| @@ -1,94 +1,24 @@ | |||
| #include <Windows.h> | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here we just replace all parse values with the new template napi_extract_args and convert the datetime values to a windows format (LARGE_INTEGER).
|




What
Improve the args handler in create file and folder placeholder and also remove some args that were not used, like itemAttributes.