projects
/
platform
/
upstream
/
glib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
230745a
)
BugĀ 598712 - can't detect text file with backspace
author
Ryan Lortie
<desrt@desrt.ca>
Fri, 20 Nov 2009 18:54:35 +0000
(12:54 -0600)
committer
Ryan Lortie
<desrt@desrt.ca>
Mon, 23 Nov 2009 18:47:16 +0000
(13:47 -0500)
looks_like_text(): Allow '\b' to appear in text files.
gio/gcontenttype.c
patch
|
blob
|
history
diff --git
a/gio/gcontenttype.c
b/gio/gcontenttype.c
index
3c7b16f
..
0a95e5b
100644
(file)
--- a/
gio/gcontenttype.c
+++ b/
gio/gcontenttype.c
@@
-295,7
+295,7
@@
looks_like_text (const guchar *data,
for (i = 0; i < data_size; i++)
{
c = data[i];
- if (g_ascii_iscntrl (c) && !g_ascii_isspace (c))
+ if (g_ascii_iscntrl (c) && !g_ascii_isspace (c)
&& c != '\b'
)
return FALSE;
}
return TRUE;
@@
-832,7
+832,8
@@
looks_like_text (const guchar *data, gsize data_size)
c = data[i];
if (g_ascii_iscntrl (c) &&
- !g_ascii_isspace (c))
+ !g_ascii_isspace (c) &&
+ c != '\b')
return FALSE;
}
return TRUE;