Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
debomatic-webui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
debomatic-webui-admins
debomatic-webui
Commits
a9c8118d
Commit
a9c8118d
authored
Mar 08, 2014
by
Leo Iannacone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix close watcher on changing watch_path
parent
e9ab5277
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
debomatic-webui/app.js
debomatic-webui/app.js
+10
-4
No files found.
debomatic-webui/app.js
View file @
a9c8118d
...
@@ -43,11 +43,17 @@ app.get('/', routes.index);
...
@@ -43,11 +43,17 @@ app.get('/', routes.index);
function
watch_path_onsocket
(
event_name
,
socket
,
data
,
watch_path
,
updater
)
{
function
watch_path_onsocket
(
event_name
,
socket
,
data
,
watch_path
,
updater
)
{
name
=
"
watcher-
"
+
event_name
name
=
"
watcher-
"
+
event_name
socket
.
get
(
name
,
function
(
err
,
watcher
)
{
socket
.
get
(
name
,
function
(
err
,
watcher
)
{
if
(
watcher
)
if
(
watcher
)
{
watcher
.
close
()
try
{
watcher
.
unwatch
()
}
catch
(
errorWatchingDirectory
)
{
watcher
.
close
()
}
}
try
{
try
{
fs
.
stat
(
watch_path
,
function
(
err
,
stats
)
{
fs
.
stat
(
watch_path
,
function
(
err
,
stats
)
{
watcher
=
null
if
(
err
)
return
if
(
stats
.
isDirectory
())
{
if
(
stats
.
isDirectory
())
{
watcher
=
fs
.
watch
(
watch_path
,
{
persistent
:
true
},
function
(
event
,
fileName
)
{
watcher
=
fs
.
watch
(
watch_path
,
{
persistent
:
true
},
function
(
event
,
fileName
)
{
if
(
event
==
'
rename
'
)
if
(
event
==
'
rename
'
)
...
@@ -61,8 +67,8 @@ function watch_path_onsocket(event_name, socket, data, watch_path, updater) {
...
@@ -61,8 +67,8 @@ function watch_path_onsocket(event_name, socket, data, watch_path, updater) {
updater
(
socket
,
data
)
updater
(
socket
,
data
)
})
})
}
}
socket
.
set
(
name
,
watcher
)
})
})
socket
.
set
(
name
,
watcher
)
}
catch
(
err_watch
)
{}
}
catch
(
err_watch
)
{}
})
})
}
}
...
...
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