void-packages/srcpkgs/curlftpfs/patches/curlftpfs-0.9.2-create-fix.patch
Đoàn Trần Công Danh c987560802 srcpkgs/c*: convert patches to -Np1
```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

32 lines
866 B
Diff

--- a/ftpfs.c 2013-05-12 14:31:57.000000000 +0400
+++ b/ftpfs.c 2013-05-12 14:29:00.906721322 +0400
@@ -759,13 +759,13 @@
err = -ENOTSUP;
}
- if ((fi->flags & O_EXCL))
- {
- DEBUG(1, "opening %s with O_EXCL - testing existence\n", path);
- int exists_r = test_exists(path);
- if (exists_r != -ENOENT)
- err = -EACCES;
- }
+// if ((fi->flags & O_EXCL))
+// {
+// DEBUG(1, "opening %s with O_EXCL - testing existence\n", path);
+// int exists_r = test_exists(path);
+// if (exists_r != -ENOENT)
+// err = -EACCES;
+// }
if (!err)
{
@@ -816,6 +816,8 @@
#if FUSE_VERSION >= 25
static int ftpfs_create(const char* path, mode_t mode,
struct fuse_file_info* fi) {
+// return ftpfs_open_common(path, mode, fi);
+ ftpfs_mknod(path, mode, NULL);
return ftpfs_open_common(path, mode, fi);
}
#endif