wastebasket: Stop infinite loop if .waste is not found.
This commit is contained in:
parent
4389fb20e5
commit
acd02c003d
3
Makefile
3
Makefile
|
@ -26,4 +26,5 @@ install:
|
||||||
mkdir -p /usr/local/share/man/man1
|
mkdir -p /usr/local/share/man/man1
|
||||||
parallel ln -sf `pwd`/{} /usr/local/share/man/man1/{/} ::: */*.1
|
parallel ln -sf `pwd`/{} /usr/local/share/man/man1/{/} ::: */*.1
|
||||||
mkdir -p $(HOME)/.local/share/vlc/lua/extensions
|
mkdir -p $(HOME)/.local/share/vlc/lua/extensions
|
||||||
ln -s `pwd`/splitvideo/dotlocal/share/vlc/lua/extensions/splitvideo.lua $(HOME)/.local/share/vlc/lua/extensions/splitvideo.lua
|
ln -sf `pwd`/splitvideo/dotlocal/share/vlc/lua/extensions/splitvideo.lua $(HOME)/.local/share/vlc/lua/extensions/splitvideo.lua
|
||||||
|
ln -sf `pwd`/wastebasket/dotlocal/share/vlc/lua/extensions/WasteBasket.lua $(HOME)/.local/share/vlc/lua/extensions/WasteBasket.lua
|
||||||
|
|
|
@ -74,6 +74,11 @@ function wastedir(dir)
|
||||||
end
|
end
|
||||||
-- try the parent dir
|
-- try the parent dir
|
||||||
local parent = dirname(dir)
|
local parent = dirname(dir)
|
||||||
|
if(parent == dir) then
|
||||||
|
-- we have reached root (/)
|
||||||
|
-- return wdir (which does not exist)
|
||||||
|
return wdir
|
||||||
|
end
|
||||||
vlc.msg.dbg("[Wastebasket/wastedir] parent " .. parent)
|
vlc.msg.dbg("[Wastebasket/wastedir] parent " .. parent)
|
||||||
if directory_exists(parent) then
|
if directory_exists(parent) then
|
||||||
return wastedir(parent)
|
return wastedir(parent)
|
Loading…
Reference in a new issue