File tree Expand file tree Collapse file tree
dConnectDevicePlugin/dConnectDeviceHost/dConnectDeviceHost/Classes/profile
dConnectSDK/dConnectSDKForIOS/DConnectSDK/Classes Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -166,11 +166,13 @@ - (instancetype)init
166166 [response setErrorToInvalidRequestParameterWithMessage: @" Directory can not be specified; use Move Directory API instead." ];
167167 return YES ;
168168 }
169- if (![sysFileMgr fileExistsAtPath: dstNewPath isDirectory: &isDirectory]) {
169+ BOOL isExtension = ([dstNewPath pathExtension ] && [dstNewPath pathExtension ].length > 0 )?YES :NO ;
170+ if (![sysFileMgr fileExistsAtPath: dstNewPath isDirectory: &isDirectory]
171+ && !isExtension && !isDirectory) { // 拡張子がない存在しないファイルが指定された場合
170172 [response setErrorToInvalidRequestParameterWithMessage: @" NewPath not exist." ];
171173 return YES ;
172174 } else if ([sysFileMgr fileExistsAtPath: dstNewPath isDirectory: &isDirectory]
173- && ![[dstNewPath pathExtension ] isEqualToString: @" " ] && !forceOverwrite) {
175+ && ![[dstNewPath pathExtension ] isEqualToString: @" " ] && !forceOverwrite) {
174176 [response setErrorToInvalidRequestParameterWithMessage: @" NewPath File already exist." ];
175177 return YES ;
176178 } else if (isDirectory) {
Original file line number Diff line number Diff line change @@ -570,8 +570,6 @@ - (NSString *)createFileForPath:(NSString *)path contents:(NSData *)contents
570570 withIntermediateDirectories: YES
571571 attributes: nil
572572 error: &error];
573- NSLog (@" fileURLWithPath:%@ " , [NSURL fileURLWithPath: path]);
574- NSLog (@" URLByAppendingPathComponent:%@ " , [self .URL URLByAppendingPathComponent: path]);
575573 if (error) {
576574 DCLogW (@" Failed to create intermediate directories." );
577575 return nil ;
You can’t perform that action at this time.
0 commit comments