-
Notifications
You must be signed in to change notification settings - Fork 806
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
SetTempFolder() should take wchar_t instead of char so that we don't #1916
Merged
Merged
Changes from 1 commit
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -267,9 +267,9 @@ - (NSArray*)subpathsAtPath:(NSString*)path { | |
@Notes attributes parameter not supported. error parameter not supported. | ||
*/ | ||
- (BOOL)createDirectoryAtURL:(NSURL*)url | ||
withIntermediateDirectories:(BOOL)createIntermediates | ||
attributes:(NSDictionary*)attrs | ||
error:(NSError**)err { | ||
withIntermediateDirectories:(BOOL)createIntermediates | ||
attributes:(NSDictionary*)attrs | ||
error:(NSError**)err { | ||
id path = [url path]; | ||
|
||
return [self createDirectoryAtPath:path withIntermediateDirectories:createIntermediates attributes:attrs error:err]; | ||
|
@@ -280,9 +280,9 @@ - (BOOL)createDirectoryAtURL:(NSURL*)url | |
@Notes attributes parameter not supported. error parameter is not populated | ||
*/ | ||
- (BOOL)createDirectoryAtPath:(NSString*)pathAddr | ||
withIntermediateDirectories:(BOOL)createIntermediates | ||
attributes:(NSDictionary*)attrs | ||
error:(NSError**)err { | ||
withIntermediateDirectories:(BOOL)createIntermediates | ||
attributes:(NSDictionary*)attrs | ||
error:(NSError**)err { | ||
if (createIntermediates) { | ||
const char* path = [pathAddr UTF8String]; | ||
id components = [pathAddr pathComponents]; | ||
|
@@ -400,11 +400,10 @@ - (BOOL)copyItemAtPath:(id)srcPath toPath:(id)destPath error:(NSError**)error { | |
[outputStream open]; | ||
[inputStream open]; | ||
auto closeStreams = wil::ScopeExit([&outputStream, &inputStream]() { | ||
[outputStream close]; | ||
[inputStream close]; | ||
[outputStream close]; | ||
[inputStream close]; | ||
}); | ||
|
||
|
||
if (NSStreamStatusOpen != inputStream.streamStatus) { | ||
TraceError(TAG, L"Error opening %hs", src); | ||
return NO; | ||
|
@@ -417,7 +416,6 @@ - (BOOL)copyItemAtPath:(id)srcPath toPath:(id)destPath error:(NSError**)error { | |
|
||
uint8_t in[4096]; | ||
while ([inputStream hasBytesAvailable]) { | ||
|
||
NSInteger readResult = [inputStream read:in maxLength:_countof(in)]; | ||
if (readResult == -1) { | ||
return NO; | ||
|
@@ -427,7 +425,6 @@ - (BOOL)copyItemAtPath:(id)srcPath toPath:(id)destPath error:(NSError**)error { | |
const unsigned char* baseAddress = (const unsigned char*)in; | ||
|
||
while (bytesToWrite > 0) { | ||
|
||
auto result = [outputStream write:(baseAddress + (readResult - bytesToWrite)) maxLength:bytesToWrite]; | ||
if (result == -1) { | ||
return NO; | ||
|
@@ -844,7 +841,7 @@ - (const char*)fileSystemRepresentationWithPath:(id)pathAddr { | |
*/ | ||
- (id)stringWithFileSystemRepresentation:(const char*)path length:(NSUInteger)length { | ||
UNIMPLEMENTED(); | ||
return [NSString stringWithCString:path length:length]; | ||
return [NSString stringWithUTF8String:path length:length]; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not an actual method. |
||
} | ||
|
||
// Managing the Delegate | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I assume the formats got corrected here?