提交 c0fffd39 编写于 作者: wafwerar's avatar wafwerar

[TD-13062]<fix>: file system add stream.

上级 2b9dc8c7
...@@ -187,7 +187,6 @@ int32_t taosStatFile(const char *path, int64_t *size, int32_t *mtime) { ...@@ -187,7 +187,6 @@ int32_t taosStatFile(const char *path, int64_t *size, int32_t *mtime) {
void autoDelFileListAdd(const char *path) { return; } void autoDelFileListAdd(const char *path) { return; }
TdFilePtr taosOpenFile(const char *path, int32_t tdFileOptions) { TdFilePtr taosOpenFile(const char *path, int32_t tdFileOptions) {
printf("%s(%d) %s path=%s tdFileOptions=%d\n", __FILE__, __LINE__,__func__,path,tdFileOptions);
#if defined(_TD_WINDOWS_64) || defined(_TD_WINDOWS_32) #if defined(_TD_WINDOWS_64) || defined(_TD_WINDOWS_32)
return NULL; return NULL;
#else #else
...@@ -205,7 +204,6 @@ TdFilePtr taosOpenFile(const char *path, int32_t tdFileOptions) { ...@@ -205,7 +204,6 @@ TdFilePtr taosOpenFile(const char *path, int32_t tdFileOptions) {
assert(!(tdFileOptions & TD_FILE_EXCL)); assert(!(tdFileOptions & TD_FILE_EXCL));
fp = fopen(path, mode); fp = fopen(path, mode);
if (fp == NULL) { if (fp == NULL) {
printf("%s(%d) %s\n", __FILE__, __LINE__,__func__);
return NULL; return NULL;
} }
} else { } else {
...@@ -224,7 +222,6 @@ TdFilePtr taosOpenFile(const char *path, int32_t tdFileOptions) { ...@@ -224,7 +222,6 @@ TdFilePtr taosOpenFile(const char *path, int32_t tdFileOptions) {
access |= (tdFileOptions & TD_FILE_EXCL) ? O_EXCL : 0; access |= (tdFileOptions & TD_FILE_EXCL) ? O_EXCL : 0;
fd = open(path, access, S_IRWXU | S_IRWXG | S_IRWXO); fd = open(path, access, S_IRWXU | S_IRWXG | S_IRWXO);
if (fd == -1) { if (fd == -1) {
printf("%s(%d) %s access=%d\n", __FILE__, __LINE__,__func__,access);
return NULL; return NULL;
} }
} }
...@@ -237,13 +234,11 @@ TdFilePtr taosOpenFile(const char *path, int32_t tdFileOptions) { ...@@ -237,13 +234,11 @@ TdFilePtr taosOpenFile(const char *path, int32_t tdFileOptions) {
if (pFile == NULL) { if (pFile == NULL) {
if (fd >= 0) close(fd); if (fd >= 0) close(fd);
if (fp != NULL) fclose(fp); if (fp != NULL) fclose(fp);
printf("%s(%d) %s\n", __FILE__, __LINE__,__func__);
return NULL; return NULL;
} }
pFile->fd = fd; pFile->fd = fd;
pFile->fp = fp; pFile->fp = fp;
pFile->refId = 0; pFile->refId = 0;
printf("%s(%d) %s\n", __FILE__, __LINE__,__func__);
return pFile; return pFile;
#endif #endif
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册