Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0be6d3c

Browse filesBrowse files
authored
Merge #9634 'fsync: Ignore ENOTSUP. Fix writing to SMB.'
2 parents 40f5a6c + 9969162 commit 0be6d3c
Copy full SHA for 0be6d3c

File tree

Expand file treeCollapse file tree

5 files changed

+11
-6
lines changed
Filter options
Expand file treeCollapse file tree

5 files changed

+11
-6
lines changed

‎src/nvim/event/socket.c

Copy file name to clipboardExpand all lines: src/nvim/event/socket.c
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ void socket_watcher_close(SocketWatcher *watcher, socket_close_cb cb)
169169
FUNC_ATTR_NONNULL_ARG(1)
170170
{
171171
watcher->close_cb = cb;
172-
uv_close((uv_handle_t *)watcher->stream, close_cb);
172+
uv_close(STRUCT_CAST(uv_handle_t, watcher->stream), close_cb);
173173
}
174174

175175
static void connection_event(void **argv)

‎src/nvim/fileio.c

Copy file name to clipboardExpand all lines: src/nvim/fileio.c
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3405,7 +3405,9 @@ buf_write (
34053405
// (could be a pipe).
34063406
// If the 'fsync' option is FALSE, don't fsync(). Useful for laptops.
34073407
int error;
3408-
if (p_fs && (error = os_fsync(fd)) != 0 && !device) {
3408+
if (p_fs && (error = os_fsync(fd)) != 0 && !device
3409+
// fsync not supported on this storage.
3410+
&& error != UV_ENOTSUP) {
34093411
SET_ERRMSG_ARG(_("E667: Fsync failed: %s"), error);
34103412
end = 0;
34113413
}

‎src/nvim/os/fileio.c

Copy file name to clipboardExpand all lines: src/nvim/os/fileio.c
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,10 @@ int file_fsync(FileDescriptor *const fp)
229229
return flush_error;
230230
}
231231
const int fsync_error = os_fsync(fp->fd);
232-
if (fsync_error != UV_EINVAL && fsync_error != UV_EROFS) {
232+
if (fsync_error != UV_EINVAL
233+
&& fsync_error != UV_EROFS
234+
// fsync not supported on this storage.
235+
&& fsync_error != UV_ENOTSUP) {
233236
return fsync_error;
234237
}
235238
return 0;

‎src/nvim/os/fs.c

Copy file name to clipboardExpand all lines: src/nvim/os/fs.c
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,7 @@ ptrdiff_t os_write(const int fd, const char *const buf, const size_t size,
643643
///
644644
/// @param fd the file descriptor of the file to flush to disk.
645645
///
646-
/// @return `0` on success, a libuv error code on failure.
646+
/// @return 0 on success, or libuv error code on failure.
647647
int os_fsync(int fd)
648648
{
649649
int r;

‎third-party/CMakeLists.txt

Copy file name to clipboardExpand all lines: third-party/CMakeLists.txt
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,8 @@ if(WIN32)
123123
set(LIBUV_URL https://github.com/neovim/libuv/archive/0ed7feb71ca949f7a96ccb102481d17ea1bb5933.tar.gz)
124124
set(LIBUV_SHA256 813fe763022f19878557c6fde311b6394fb9180caaaab0dd98d8704732234508)
125125
else()
126-
set(LIBUV_URL https://github.com/libuv/libuv/archive/v1.23.2.tar.gz)
127-
set(LIBUV_SHA256 30af979c4f4b8d1b895ae6d115f7400c751542ccb9e656350fc89fda08d4eabd)
126+
set(LIBUV_URL https://github.com/libuv/libuv/archive/v1.26.0.tar.gz)
127+
set(LIBUV_SHA256 e414cf74615b7dae768f0f5667092f1d4975f5067c087bcbe0641e241ebe4693)
128128
endif()
129129

130130
set(MSGPACK_URL https://github.com/msgpack/msgpack-c/releases/download/cpp-3.0.0/msgpack-3.0.0.tar.gz)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.