Bug #3776
When delete file -no delete directory
0%
Description
Hi
I have a TVHeadend in version 4.1.1945 and use it on my Synology DS713+
I have a problem because when i delete recorded file from webui TVHeadend sometimes directory with date is not delete and also directory with name channel also is no delete. Only file in this directory was delete. But sometimes all is ok and all (with directory date, directory name channel and file recording programm) was delete OK. I dont know where is problem. Recording is ok and ok create directory and files. In log show only this info:
2016-05-04 13:18:39.689 dvr: delete entry 48fc362d7d3ff4712c824e7e007dfc36 "Turbo kamera 18" on "TVN Turbo" start time 2016-05-03 22:14:30, scheduled for recording by "admin", retention "On file removal" removal "Forever"
2016-05-04 13:19:14.632 dvr: delete entry 60b3f53bd4b738ba4bb31a99c126ec40 "Legendy motoryzacji" on "TVN Turbo HD" start time 2016-05-01 12:44:30, scheduled for recording by "admin", retention "On file removal" removal "Forever"
2016-05-04 13:19:18.613 dvr: delete entry 0489e297f50946724034dfbca0303d60 "Absurdy drogowe 4" on "TVN Turbo HD" start time 2016-05-01 12:14:30, scheduled for recording by "admin", retention "On file removal" removal "Forever"
Please help me...
History
Updated by Jaroslav Kysela over 8 years ago
Apply these changes and provide the log when the directories are not removed. Note that only empty directories can be removed.
diff --git a/src/utils.c b/src/utils.c index 5b13ccd..242ee2f 100644 --- a/src/utils.c +++ b/src/utils.c @@ -698,7 +698,9 @@ deferred_unlink_dir_cb(void *s, int dearmed) p[l] = 0; if(strncmp(p, du->rootdir, l) == 0) break; + tvhinfo("main", "removing directory '%s'", p); if(rmdir(p) == -1) + tvhinfo("main", "removing directory '%s' fail: %d (%s)", p, errno, strerror(errno)); break; } }
Updated by Piotr Kuchciak over 8 years ago
But where i must add this changes ? I use spk package and probably i can not change file.
It was add to next version after 4.1.1945 ?
Updated by Piotr Kuchciak over 8 years ago
You tell me about empty directory. But when i delete file , then directory is empty and should be delete.
Updated by Jaroslav Kysela over 8 years ago
If you have 'strace' installed, you may try this:
strace -f -e trace=rmdir <tvh_command>
Updated by Piotr Kuchciak over 8 years ago
?? can you explaine me... i dont know about you tell me... I am begginner...
Updated by Piotr Kuchciak over 8 years ago
Again is problem
In log show:2016-05-04 21:35:57.534 dvr: delete entry 5acf53cb512ec06f609ad6408264bfd3 "Szpital - s. IV, odc. 516" on "TVN" start time 2016-05-04 12:59:30, scheduled for recording by "admin", retention "On file removal" removal "Forever"
2016-05-04 21:35:57.535 dvr: delete entry 37eec712bddd691c3e31a84a238c1414 "Witaj Kaniousha" on "Filmbox Premium" start time 2016-05-04 12:34:30, scheduled for recording by "admin", retention "On file removal" removal "Forever"
2016-05-04 21:35:57.544 dvr: delete entry aa47755d597cbf73da85cbd5d8e6e2c3 "Tenis: Turniej ATP w Madrycie" on "Polsat Sport" start time 2016-05-04 11:59:30, scheduled for recording by "admin", retention "On file removal" removal "Forever"
2016-05-04 21:35:57.546 dvr: delete entry 8cc2648b995e81bfdd02365b9043e7a2 "Tenis: Turniej ATP w Madrycie" on "Polsat Sport" start time 2016-05-04 11:59:30, scheduled for recording by "admin", retention "On file removal" removal "Forever"
2016-05-04 21:35:57.546 dvr: delete entry d72811702b191c542d2a2c424fc621d6 "Piłka nożna: Lokomotiw Moskwa - Spartak Moskwa" on "Polsat Sport Extra" start time 2016-05-04 11:19:30, scheduled for recording by "admin", retention "On file removal" removal "Forever"
But directory name: Filmbox Premium, Polsat Sport, Polsat Sport Extra, TVN was no delete. Only delete files from this folder.
Updated by Piotr Kuchciak over 8 years ago
Hi
I found problem. Directories is not delete after my synology indexing multimedia to DLNA. When files and directories is not indexing deleted foler and file works ok.
Maybe you can help me write script to i can run after delete recording to delete directories which is no delete ? Please help me... an i add this script to Post remove command.
Updated by Piotr Kuchciak over 8 years ago
hi
I found a problem. Indexing on Synology create in directory own directory name "@eaDir". When i try delete recording from webui TVheadend , TVH delete only file because directory is not empty becuase consist directory "@eaDir". When manualy delete directory "@eaDir" before delete from TVH, then when i delete from TVH delete works ok.
I suggest to change mechanism delete recordings... to skip when is deleting skip directory "@eaDir" or other good solution.