{"issue":{"pull_request":{"diff_url":null,"html_url":null,"patch_url":null},"state":"open","user":{"avatar_url":"https://secure.gravatar.com/avatar/7626ac95577e262a7657679021c76052?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"7626ac95577e262a7657679021c76052","url":"https://api.github.com/users/adren","login":"adren","id":1158866},"milestone":null,"labels":[],"assignee":null,"updated_at":"2011-10-28T23:14:09Z","closed_at":null,"comments":0,"url":"https://api.github.com/repos/thomas-joiner/k4dirstat/issues/1","body":"Hello,\r\n\r\nFirst I wanted to thank you about your work and that you picked up on this nice project (kdirstat) in order to revive it with this new version: it has been very useful and I'm using it regularly.\r\n\r\nBecause I usually launch k4dirstat from a terminal, I realized that whenever I was deleting a file, that the program was showing the command used for the deletion: the \"rm\" with the -rf on top of that that would wipe everything recursively underneath in case of a directory!!.\r\nAnd because the parameter to delete the file was enclosed in double quotes, it also means that whatever parameter that would be within the quotes would be interpreted.\r\nIt means that in order to hit the right file or directory which would have a dollar sign ($) in it, the program would have to use a pair of strong quotes to keep the variable untouched.\r\n\r\nIf this is not clear, let me give you a very unlikely example that would demonstrate my point:\r\n\r\nLet image that you see a bunch of file and among them you have 1 directory:\r\n\r\nx.\r\nx.$a\r\n\r\nwith literally the '$a' at the end which means that if you want to create you'd have to type the following command\r\nmkdir 'x.$a'\r\n\r\n\r\nnow, if you select the 2nd directory (x.$a) and you ask to delete it permanently (no way to remove), because of the \"weak\" quotes the $a is expanded and translate into a null string which in turn means that the other directory (x.) is recursively deleted by the \"rm -rf\" command without any chance to recover the files under it\r\n\r\nAlthough my example is a proof of concept a little bit far fetched, I think this is a bug that could lead to consequence and that it should be solved by putting string quotes (') instead.\r\n\r\n\r\n  Regards","html_url":"https://github.com/thomas-joiner/k4dirstat/issues/1","number":1,"title":"small bug in k4dirstat (weak vs strong quotes)","id":2084793,"created_at":"2011-10-28T23:14:09Z"},"action":"opened"}