refresh parseEnhance2.diff
[nedit-bw.git] / fix_zero_sized_files_and_pipe.patch
blobde0684242cbd5bf76c320c40225fd36c794d83d4
1 ---
3 source/file.c | 4 +++-
4 1 files changed, 3 insertions(+), 1 deletion(-)
6 diff --quilt old/source/file.c new/source/file.c
7 --- old/source/file.c
8 +++ new/source/file.c
9 @@ -900,11 +900,13 @@ static void removeZeroSizedFile(WindowIn
10 strcat(fullname, window->filename);
12 if (GetPrefZeroSizedMode() == ZEROSIZED_NEVER)
13 return;
15 - if (stat(fullname, &statbuf) == 0 && statbuf.st_size == 0) {
16 + if (stat(fullname, &statbuf) == 0
17 + && statbuf.st_size == 0
18 + && !S_ISFIFO(statbuf.st_mode)) {
19 if (GetPrefZeroSizedMode() == ZEROSIZED_PROMPT) {
20 response = DialogF(DF_QUES, window->shell, 2, "Zero Sized File",
21 "%s has a file size of 0.\nDo you want to remove this file?",
22 "Yes", "No", fullname);
23 if (response == 2)