There are problems running blender using UNC paths #21836

Closed
opened 2010-03-30 14:50:07 +02:00 by Rob McKay · 15 comments

%%%When running blender from a network share a number of UNC names get corrupted.

eg blender somtimes resolves the .B25.blend file to

c:\machine\share\path\.blender\.B25.blend

when it should be

\\machine\share\path\.blender\.B25.blend

The same thing happens for the following directories

.blender\python
.blender\scripts\modules
.blender\icons
.blender\.Blog
.blender\autosave

I know that this a duplicate but if it keeps getting closed because it's not supported, it will never get fixed.

I've attached an initial patch but I've only done a quick test of it. It may need applying to other bits of the file handling code. %%%

%%%When running blender from a network share a number of UNC names get corrupted. eg blender somtimes resolves the .B25.blend file to ``` c:\machine\share\path\.blender\.B25.blend ``` when it should be ``` \\machine\share\path\.blender\.B25.blend ``` The same thing happens for the following directories ``` .blender\python ``` ``` .blender\scripts\modules ``` ``` .blender\icons ``` ``` .blender\.Blog ``` ``` .blender\autosave ``` I know that this a duplicate but if it keeps getting closed because it's not supported, it will never get fixed. I've attached an initial patch but I've only done a quick test of it. It may need applying to other bits of the file handling code. %%%
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

%%%I've attached a further patch which also seems to allow use of UNC paths in the file dialogs%%%

%%%I've attached a further patch which also seems to allow use of UNC paths in the file dialogs%%%
Member

%%%Hi, as mentioned previously this doesn't belong in the bug tracker - it's for things that were coded to work, but don't because of some fault. UNC path handling was never intended to work.

Anyway I'll move this to the patch tracker and assign to Andrea. Thanks!%%%

%%%Hi, as mentioned previously this doesn't belong in the bug tracker - it's for things that were coded to work, but don't because of some fault. UNC path handling was never intended to work. Anyway I'll move this to the patch tracker and assign to Andrea. Thanks!%%%
Member

%%%Hi Rob, I gave it a little try here, I couldn't see any files her on my UNC share yet, but I'll take a closer look in the next days, need some time to properly test.

One small issue though, when doing patches, we usually don't put our names next to each line, that's what either the contributors line in the file is for or we mention patch contributors in the svn commit log too.

This is much wanted functionality anyway so thanks for contributing,

Andrea

%%%

%%%Hi Rob, I gave it a little try here, I couldn't see any files her on my UNC share yet, but I'll take a closer look in the next days, need some time to properly test. One small issue though, when doing patches, we usually don't put our names next to each line, that's what either the contributors line in the file is for or we mention patch contributors in the svn commit log too. This is much wanted functionality anyway so thanks for contributing, Andrea %%%
Author

%%%Hi Andrea,

The comment was only there so that when I'm editing the code I can see which changes I've made. I'll remove them in future.

Rob%%%

%%%Hi Andrea, The comment was only there so that when I'm editing the code I can see which changes I've made. I'll remove them in future. Rob%%%
Author

%%%The latest version tidies the code and makes it more robust and removes the Rob comment%%%

%%%The latest version tidies the code and makes it more robust and removes the Rob comment%%%
Member

%%%Hi Rob, I checked your patch out today.

Two issues I found, I can't access the UNC path if just the servername is specified, like
\SERVERNAME

I think this should work since it works for the Windows Explorer.

The second thing is that for UNC path I saw a file '..' added which didn't have the correct icon for 'Parent folder' which means that for some reason the directory flag S_ISDIR isn't set on that. This happens in the case that you disable all filters.

I'll check on these things too, but if you can take a look would be great since my time is a bit limited at the moment.

  • Andrea
    %%%
%%%Hi Rob, I checked your patch out today. Two issues I found, I can't access the UNC path if just the servername is specified, like \\SERVERNAME I think this should work since it works for the Windows Explorer. The second thing is that for UNC path I saw a file '..' added which didn't have the correct icon for 'Parent folder' which means that for some reason the directory flag S_ISDIR isn't set on that. This happens in the case that you disable all filters. I'll check on these things too, but if you can take a look would be great since my time is a bit limited at the moment. - Andrea %%%
Author

%%%Hi Andrea,

The patch doesn't fix \SERVERNAME because you can't use the directory open functions to find the shares.

This patch only changes enough to get unc names working.

Getting the \SERVERNAME to work probably requires a lot of work and is not a quick patch like the rest was. Also it you are going to support \servername you would probably also want to support network browsing which are easy enough if you use the Microsoft dialog boxes but not so easy to implement yourself especially as there are some registry settings which you should check to see exactly what you are allowed to browse for and where you are allowed to browse.

%%%

%%%Hi Andrea, The patch doesn't fix \\SERVERNAME because you can't use the directory open functions to find the shares. This patch only changes enough to get unc names working. Getting the \\SERVERNAME to work probably requires a lot of work and is not a quick patch like the rest was. Also it you are going to support \\servername you would probably also want to support network browsing which are easy enough if you use the Microsoft dialog boxes but not so easy to implement yourself especially as there are some registry settings which you should check to see exactly what you are allowed to browse for and where you are allowed to browse. %%%
Author

%%%Hi Andrea,

I've updated the patch to fix the problem with "..".

Rob.%%%

%%%Hi Andrea, I've updated the patch to fix the problem with "..". Rob.%%%

Added subscriber: @ideasman42

Added subscriber: @ideasman42

Checked the patch and it looks like it will give problems with interoperability on unix systems.

Even though the paths wont work on unix, opening and saving shouldn't break the files either.

  • path on windows \\foo\bar
  • loads on unix, converts to //foo/bar (from running BLI_char_switch(file, '\\', '/'),
  • // prefix is interpreted as the blend file path and expands,
  • loads on windows and fails.

This could be resolved by never switching prefix slashes (all path conversion functions can be made to skip initial slashes so the \\ prefix never converts to //).

Checked the patch and it looks like it will give problems with interoperability on unix systems. Even though the paths wont work on unix, opening and saving shouldn't break the files either. - path on windows `\\foo\bar` - loads on unix, converts to `//foo/bar` (from running `BLI_char_switch(file, '\\', '/')`, - `//` prefix is interpreted as the blend file path and expands, - loads on windows and fails. This could be resolved by never switching prefix slashes (all path conversion functions can be made to skip initial slashes so the `\\` prefix never converts to `//`).
Member

Uploaded new version with a bit of cleanup and fixes after testing.

This should allow to enter a UNC path in the file browser and should work if user can otherwise access it without restrictions.

Uploaded new version with a bit of cleanup and fixes after testing. This should allow to enter a UNC path in the file browser and should work if user can otherwise access it without restrictions.
Member

Added subscriber: @jta

Added subscriber: @jta
Member

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Member

Resolved by modified Differential Revision D298

Resolved by modified Differential Revision [D298](https://archive.blender.org/developer/D298)
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
5 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#21836
No description provided.