Age | Commit message (Collapse) | Author |
|
BLI_filename_make_safe had several issues:
* Would replace all dots ('.'), not a great idea since it would break extensions.
* Was not checking for 'control' ASCII chars (though unlikely, better to be safe here).
* Win32 only: was not checking for forbidden names (con, aux, ltp0, com0, etc.).
New BLI_path_make_safe() simply checks each path's item with BLI_filename_make_safe().
|
|
|
|
|
|
filenames.
Added BLI_path utility functions to decompose a path name and
extract the frame number. It should be useful in autocollapse
feature as well
|
|
|
|
|
|
binary-search is confusing!
|
|
|
|
Here again, stat on '\\MYSERVER\foo\..' does not work...
Anyway, we can handle this in a much much simpler way using
BLI_access and BLI_parent_dir...
|
|
|
|
|
|
Also, avoid calling ugly strcmp with '.' or '..', making direct char checks is
much cheaper here!
|
|
Makes usage of those funcs much more clear, we even had mixed '!strcmp(foo, bar)'
and 'strcmp(foo, bar) == 0' in several places...
|
|
|
|
contains a '/'
Added a new BLI_path_utils func, `BLI_filename_make_safe()`, which for now simply
replaces unsafe chars for paths (like '\' or '/') by an underscore...
|
|
Do not allow going into un-readable directories at all.
Note we might want to reflect that 'state' in UI for users too, but that will be
for later.
Also, not quite sure this fix the windows case, will have to start my VM... :/
|
|
|
|
|
|
Making paths absolute would leave in "\..\" part on windows.
|
|
|
|
This module is intended for path manipulation functions
but had utility functions added to access various directories.
|
|
|
|
win32 BLI_path_abs expanded empty strings into "C:\\",
which made BLI_exists succeed (quite confusing).
Now match behavior on *nix.
|
|
upcoming codesigning needs
- i used deprecated rules up to now which will break in OSX > 10.9.5 and 10.10 > dp4
- todo: adapt cmake due it will break with this commit
|
|
|
|
|
|
Sigh, why can't all unix have same includes? :/
|
|
Current temporary data of Blender suffers one major issue - default 'temp' dir on Windows is never
automatically cleaned up, and can end being quite big when used by Blender, especially when we have
to store per-process data (using getpid() in file names).
To address this, this patch:
* Divides tempdir paths in two, one for 'base' temp dir (the same as previous unique tempdir path),
the other is a mkdtemp-generated sub-dir, specific to each Blender instance.
* Only uses base tempdir when we need some shallow persistance accross Blender sessions - and we always
reuse the same filename (quit.blend...) or generate small file (crash reports...).
* Uses temp sub-dir for heavy files like pointcache or renderEXRs (Save Buffer option).
* Erases temp sub-dir on quit or crash.
To get this working it also adds a working 'recursive delete' to BLI_delete() under Windows.
Note that, as in current code, the 'recover render result' hack-feature that was possible
with SaveBuffer option is still removed. A real renderresult cache feature will be added
soon, though.
Reviewers: campbellbarton, brecht, sergey
Reviewed By: campbellbarton, sergey
CC: sergey
Differential Revision: https://developer.blender.org/D531
|
|
|
|
On windows "." was replaced with the root directory.
On other systems any path starting with a '.' would be replaced with "/"
This was added for the file selector only,
so better handle this in the file selector (though it looks not to be needed).
|
|
|
|
|
|
(before the extension)
Revision: D465
Reviewd by Campbell Barton
|
|
|
|
4ca67869cc7a."
This reverts commit a47a4ef82f37428d391cc14a30fa611d6714e71d.
|
|
|
|
Opted to keep includes if they are used indirectly (even if removing is possible).
|
|
|
|
Differential Revision: https://developer.blender.org/D298
Allows users on Windows to enter UNC paths in the filebrowser and to link to .blend files on a UNC path. Functionality is limited still, we can't browse the network yet and have no support to check user rights so far.
What works:
- enter an UNC path in the file browser manually or via copy/paste
- navigation within the UNC share subfolders
- link to a file on a UNC share
What does not (yet) work:
- browse the network for computers and shares
- browse to a folder that requires entering user credentials
Contributors:
Rob McKay - original patch
Campbell Barton - style fixes
Reviewers:
Campbell Barton, Brecht van Lommel
|
|
* Comparison in utf detection code always failed
* Cast to integer to silence grumpy 64bit gcc
|
|
|
|
BLI_testextensie
also use attributes for BLI path functions
|
|
|
|
|
|
|
|
|
|
seems that somehow not having this is causing keyboard events to be caught by
SDL. This was removed because it broke addons that could use SDL, now set the
environment variable only temporary during SDL initialization.
This may have been causing issues with keyboard events getting missed in the
game engine, but I couldn't confirm the issue here.
|
|
|
|
correct, move to generic function BLI_ensure_filename().
|
|
had to be done in every file using fnmatch (autoexec.c did not, wonder how it could work under unix???).
Thanks to Brecht for noting this!
|