Closed Rand-Random closed 2 months ago
Windows does not like spaces/periods at the end of file/directory names, not sure why I only trimmed directories.
I could separate the behavior between Docker/Linux and Windows here. I'll take a look at it soon.
Sorry, that I didn't mention it in my original post. I am using Windows and I can not confirm that Windows has issues with dot at the end for directory names. Files I could see issues, because of "file type" logic, but directories?
Sorry, that I didn't mention it in my original post. I am using Windows and I can not confirm that Windows has issues with dot at the end for directory names. Files I could see issues, because of "file type" logic, but directories?
Well, you can test it for yourself via CLI or Explorer:
News to me, thanks for sharing the info.
I am in the middle of replacing my old script renamer ( https://github.com/Mik1ll/ScriptRenamer ), to this renamer, and one of the visible changes were that "a dot" was removed from the end.
I didn't confirm what I was seeing is the actual . character and not ․
Shoko seems to have magic, for exactly this case when it ends with . replace it with the looks like a dot but isn't one character https://github.com/ShokoAnime/ShokoServer/blob/9d161837337df7ae3bb8f354aef845752d8ad0d7/Shoko.Server/Utils.cs#L637
This seems to give the result I desire:
if animename:match("^%.") then
animename = "․" .. animename:sub(2)
end
if animename:match("%.$") then
animename = animename:sub(1, animename:len() - 1) .. "․"
end
by replacing the . character with this special variant of a dot, I have the same result as I had it previously.
Glad you figured it out, closing this issue as solved and will make another one regarding platform dependent path handling.
Is it possible to disable this line? https://github.com/Mik1ll/LuaRenamer/blob/70557135a93fb44a96e7dd0ed0232b1b1b534c7a/LuaRenamer/Utils.cs#L36
Why? Because some anime end with a dot, and a foldername is allowed to end with a dot, so there is not use case (atleast for me) to have this code enabled.