Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pyfs
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
pyfs
Commits
5d80a31f
Commit
5d80a31f
authored
Jan 28, 2012
by
willmcgugan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
watcher tweak
parent
e29c00bf
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
fs/osfs/watch_inotify.py
+1
-1
fs/watch.py
+3
-2
No files found.
fs/osfs/watch_inotify.py
View file @
5d80a31f
...
...
@@ -170,7 +170,7 @@ class OSFSWatchMixin(WatchableFSMixin):
if
inevt
.
mask
&
pyinotify
.
IN_MODIFY
:
watcher
.
handle_event
(
MODIFIED
(
self
,
path
,
True
))
if
inevt
.
mask
&
pyinotify
.
IN_CLOSE_WRITE
:
watcher
.
handle_event
(
MODIFIED
(
self
,
path
,
True
))
watcher
.
handle_event
(
MODIFIED
(
self
,
path
,
True
,
closed
=
True
))
if
inevt
.
mask
&
pyinotify
.
IN_MOVED_FROM
:
# Sorry folks, I'm not up for decoding the destination path.
watcher
.
handle_event
(
MOVED_SRC
(
self
,
path
,
None
))
...
...
fs/watch.py
View file @
5d80a31f
...
...
@@ -78,15 +78,16 @@ class REMOVED(EVENT):
class
MODIFIED
(
EVENT
):
"""Event fired when a file or directory is modified."""
def
__init__
(
self
,
fs
,
path
,
data_changed
=
False
):
def
__init__
(
self
,
fs
,
path
,
data_changed
=
False
,
closed
=
False
):
super
(
MODIFIED
,
self
)
.
__init__
(
fs
,
path
)
self
.
data_changed
=
data_changed
self
.
closed
=
closed
def
clone
(
self
,
fs
=
None
,
path
=
None
,
data_changed
=
None
):
evt
=
super
(
MODIFIED
,
self
)
.
clone
(
fs
,
path
)
if
data_changed
is
None
:
data_changed
=
self
.
data_changed
evt
.
data_changd
=
data_changed
evt
.
data_chang
e
d
=
data_changed
return
evt
class
MOVED_DST
(
EVENT
):
...
...
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