Age | Commit message (Collapse) | Author |
|
Things like `BLI_uniquename` had nothing, but really nothing to do in
BLI_path_util files!
Also, got rid of length limitation in `BLI_uniquename_cb`, we can use
alloca here to avoid overhead of malloc while keeping free size (within
reasonable limits of course).
|
|
Self-explanatory. to find broken links run `sphinx-build -b linkcheck sphinx-in sphinx-out`
Reviewers: mont29
Tags: #bf_blender, #python, #infrastructure:_websites
Differential Revision: https://developer.blender.org/D2297
|
|
|
|
|
|
That function was epic failing in case trying to join '//' and 'foo.blend', would
give '//\foo.blend'... Now check for both SEP and ALTSEP!
|
|
Same case as with space char really, one should not use those special chars in
filenames, but they are globally supported by all current FS/OS, so no real reason
to enforce that behvior on users here.
To be backported to 'a' release.
|
|
- remove NULL checks for args already set as ATTR_NONNULL.
- double promotion.
|
|
|
|
|
|
Filenames over 128 chars would crash.
Move BLI_newname into file_ops,
this was only used in one place and isn't all that re-usable.
Also remove special behavior for 4 digits.
|
|
Should probably be added to 'a' release, should we do one...
|
|
- BLI_current_working_dir's return value must be checked, since it may fail.
- BLI_current_working_dir now behaves like getcwd, where a too-small target will return failure.
- avoid buffer overrun with BLI_path_cwd, by taking a maxlen arg.
|
|
|
|
Own stupid error in recent fix for buffer overflow in `BLI_testextensie_glob()`...
Also found & fixed another potential buffer overflow in this func.
|
|
|
|
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.
|