Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong Filename Requested Against Case-Sensitive UNC/Mapped Network Share #165

Closed
wuffleton opened this issue Mar 14, 2017 · 4 comments
Closed
Labels
Projects
Milestone

Comments

@wuffleton
Copy link

I've recently discovered ImageGlass as a very viable alternative to Windows 10's built-in one, but I've discovered some weird behavior when using ImageGlass to view files on my network shares. All is well until I try to access any image whose name contains a capital letter.

It appears some kind of normalizing is going on somewhere (like an extra .ToLower() where it shouldn't be) which will obviously not impact anything against a Windows host or Linux/Unix host with case sensitive = no on the server/share, but will completely break loading the image if the server is expecting the same case as the name on the filesystem and the underlying filesystem is also case-sensitive.

I found that the same set of files when copied to a folder on a local drive, would load without problem. After cranking up samba's logging, I noticed that I was getting a lot of blocks similar to the following when navigating through one of my problem folders using ImageGlass:

unix_convert begin: name = tumblr_nj7uzskncq1rritjco1_1280.png, dirpath = , start = tumblr_nj7uzskncq1rritjco1_1280.png
check_reduced_name: tumblr_nj7uzskncq1rritjco1_1280.png reduced to /home/wuffleton/tumblr_nj7uzskncq1rritjco1_1280.png
unix_mode: unix_mode(tumblr_nj7uzskncq1rritjco1_1280.png) returning 0600
open_file_ntcreate: FILE_OPEN requested for file tumblr_nj7uzskncq1rritjco1_1280.png and file doesn't exist.

In this case, I noticed that it is in fact tumblr_nj7uzsKncQ1rritjco1_1280.png when considering the casing on the source filesystem. This is the same name that ImageGlass displayed in the title bar, meaning that Windows and ImageGlass are clearly seeing the right name over the share.

As I regrettably lack the skill in C# to submit a patch myself, I'd be really appreciative if this could get fixed at some point!

@d2phap
Copy link
Owner

d2phap commented Mar 14, 2017

Hi @wuffleton ,

I will look into next few days.
I may need your help to check if it works correctly

Thanks

@d2phap
Copy link
Owner

d2phap commented Mar 20, 2017

Hi @wuffleton

Here is a testing version with fixes, please help me confirm:
http://imageglass.org/upload/moon/ImageGlass_3.x_19032017.zip

@wuffleton
Copy link
Author

I can confirm that the new build is now requesting the correct names against a case-sensitive share and properly handles capital letters in the path, filename, and/or extension. No more "Imageglass cannot open this picture" messages, and no name conversion errors in the server logs.

@d2phap
Copy link
Owner

d2phap commented Mar 21, 2017

Thanks @wuffleton

@d2phap d2phap added this to the 3.5.9.17 milestone Mar 21, 2017
@d2phap d2phap added this to Done in v4.0 Mar 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
v4.0
Done
Development

No branches or pull requests

2 participants