SubSync icon indicating copy to clipboard operation
SubSync copied to clipboard

Syncing a root drive fails

Open ForeverZer0 opened this issue 7 years ago • 3 comments

I have an external HDD I use for storing movies on, where the root is F: (on my PC), and it simply contains folders containing movies. The problem is trying to get subs recursively. There are obviously some hidden system folders like F:\$RECYCLE.BIN which will crash the program when it attempts to access them.

I had a previous issue myself on minor personal project before, and found it could be easily solved while enumerating directories with something akin to this:

var info = new DirectoryInfo(path);
var root = info.Root.FullName == info.FullName;
if (!root && info.Attributes.HasFlag(FileAttributes.System))
	continue;

ForeverZer0 avatar Sep 12 '18 20:09 ForeverZer0

Good catch and thank you for reporting this issue, @ForeverZer0 !

I will fix this as soon as I get some time. Most likely tomorrow. =) I hope you can wait till then.

zerratar avatar Sep 14 '18 06:09 zerratar

No, problem, and no hurry either. It is easy oversight (speaking from first-hand experience, lol). 👍

ForeverZer0 avatar Sep 14 '18 08:09 ForeverZer0

@ForeverZer0 Unfortunately I didn't have enough time on my hands after all to create a fix when I told you I would. I did get a couple of minutes over just now so I have uploaded a temporarily and hopefully working solution for now. If you can try it out and see if it works for you; and report back, I would appreciate it a lot :-)

And thank you for your patience!

zerratar avatar Sep 26 '18 18:09 zerratar