Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
3pia
VISPA
VISPA web
Commits
539acfdb
Commit
539acfdb
authored
Nov 12, 2014
by
Benjamin Fischer
Browse files
WatchService: fixed: non-ASCII character handling in file path, filtering & cleanup
parent
c9320547
Changes
2
Hide whitespace changes
Inline
Side-by-side
vispa/extensions/codeeditor/static/js/preview.js
View file @
539acfdb
...
...
@@ -48,7 +48,7 @@ var CodeEditorPreview = Emitter.extend({
if
(
data
.
watch_id
!=
"
preview
"
)
{
return
;
}
if
(
data
.
event
!
=
"
modify
"
)
{
if
(
data
.
event
=
=
"
vanish
"
)
{
// TODO: actually do something useful
return
;
}
self
.
previewChanged
=
true
;
...
...
vispa/remote/filesystem.py
View file @
539acfdb
...
...
@@ -71,9 +71,8 @@ class FileSystem(object):
return
"Basedir now exists"
def
close
(
self
):
if
self
.
_monitor_thread
:
self
.
_monitor_thread
.
remove_all_watches
()
self
.
_monitor_thread
.
running
=
False
if
self
.
watchservice
:
self
.
watchservice
.
stop
()
def
get_mime_type
(
self
,
filepath
):
filepath
=
self
.
expand
(
filepath
)
...
...
@@ -622,7 +621,7 @@ class WatchService(object):
if
not
path
:
return
self
.
unsubscribe
(
id
)
path
=
os
.
path
.
expanduser
(
os
.
path
.
expandvars
(
path
))
path
=
os
.
path
.
expanduser
(
os
.
path
.
expandvars
(
path
))
.
encode
(
'utf8'
)
with
self
.
lock
:
if
id
not
in
self
.
subscribers
:
...
...
@@ -670,7 +669,7 @@ class WatchService(object):
for
subscriber
in
self
.
subscriber_buffer
[:]:
subscriber
.
flush
(
False
)
for
subscriber
in
self
.
subscribers
:
for
subscriber
in
self
.
subscribers
.
items
()
:
subscriber
.
destroy
()
self
.
monitor
.
remove_all_watches
()
...
...
@@ -705,7 +704,7 @@ class WatchSubscriber(object): # this should never be instanced manually
del
self
.
event_buffer
def
process
(
self
,
event
,
subject
=
""
):
if
self
.
watch
.
isdir
and
subject
and
self
.
pattern
and
self
.
pattern
.
search
(
subject
)
!=
self
.
reverse
:
if
self
.
watch
.
isdir
and
subject
and
self
.
pattern
and
bool
(
self
.
pattern
.
search
(
subject
)
)
!=
self
.
reverse
:
return
if
event
in
WatchSubscriber
.
EVENT_DELAYS
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment