Age | Commit message (Collapse) | Author |
|
This is typically an error (& hangs a few seconds on win32), best catch early.
|
|
For areas that require append, store the last node,
Previous behavior would too easily hide poorly performing code.
Also avoid (prepend, reverse) where possible.
|
|
|
|
Depends on imbuf, problematic for tests
|
|
also add function attrs on BLI_fileops to ensure they're used correctly.
|
|
file path) crashes Blender
Issue was caused by 2e9105c, free() does nothing if pointer is NULL, but guarded
allocator expects you to not free NULL.
|
|
|
|
No reason at all not to use MEM_xxx as everywhere else, especially confusing
when members of direntry **are** MEM_-allocated (relname, etc.)!
|
|
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...
|
|
|
|
Also, add an optional callback to `BLI_filelist_free()` to allow freein
void poin if needed (consistency with `BLI_filelist_duplicate()`...).
|
|
`BLI_strncpy_ensure_pad()` is also useful with current master code.
The two others (`BLI_strcmp_ignore_pad()` and `BLI_filelist_duplicate()`)
are only used in asset branch currently, but think they could be useful
in other places too, and simplifies handling of asset branch & future patch review.
Reviewers: campbellbarton
Reviewed By: campbellbarton
Differential Revision: https://developer.blender.org/D965
|
|
|
|
Goodbye VC2008, it has been a pleasure (more or less) :D SCons / CMake cleaenup will follow.
Differential Revision: https://developer.blender.org/D715
|
|
* Fixed different not-in-sync #ifdef blocks for struct stat variants under Windows.
Comments have been left to indicate the portions of BLI_fileops.h and
BLI_fileops_types.h that need to stay in sync.
* Added BLI_wstat() to de-duplicate #ifdef blocks for stat() variants on Windows.
* Fix for opendir() and associate functions in MinGW not working properly with
non-ASCII, MBCS-compatible paths.
MinGW (FREE_WINDOWS) has opendir() and _wopendir(), and only the
latter accepts a path name of wchar_t type. Rather than messing up with
extra #ifdef's here and there, Blender's own implementations of opendir()
and related functions are used to properly support paths with non-ASCII,
MBCS-compatible characters.
Tested with MSVC 2013 Express, MinGW32 (gcc 4.6.2) and MinGW-w64 (gcc 4.7.1).
Differential Revision: https://developer.blender.org/D605
Reviewed By: campbellbarton
|
|
Issue was caused by _wstat returning EOVERFLOW error because
of file size didn't fit into stat structure which was using
long datatype.
The idea of this patch is to use _wstat64 and _stat64 structure
which is capable storing 64bit file sizes.
Made it a typedef for stat structure used by BLI_stat function
in order to make code easier to follow and avoid ifdefs all
over the place.
Additionally solved issue with BLI_exists which was wrongly
returning False in cases destination file is larger then 4GB.
|
|
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
|
|
|
|
|
|
add __DragonFly__ and internal defines to avoid copy-pasting checks.
also remove __CYGWIN32__ check, since cygwin is no longer supported.
|
|
|
|
The reason of this is because PATH_MAX is not guaranteed
to be defined on all platforms and Hurd doesn't define it.
So either we need to support arbitrary long file path or
we need to define own maximum path length.
The rule here would be:
- If it's not big trouble to support arbitrary long paths
(i.e. in ghost by using std::string instead of char*)
then arbitrary long path shall be implemented.
- For other cases to use PATH_MAX please include BLI_fileops.h
which takes care of making sure PATH_MAX is defined.
Additional change: get rid of own changes made yesterday
which were supposed to make storage.c work fine in cases
PATH_MAX is not define, but on the second though it lead
to unneeded complication of the code.
Thanks Campbell for review!
|
|
|
|
|
|
|
|
|
|
|
|
- build with netbsd works again.
- select uv more/less was crashing when called outside image space.
- node RNA property update was crashing when not called in node space.
|
|
MinGW-w64 headers (where _stat is actually _stati64), but since we
recommend a specific compiler build it's OK for now. Also tweaked other
places where _wstat is used.
|
|
remove unused initializations and comment unused vars.
|
|
|
|
the recently opened files was on a DVD that's no longer there in the DVD drive.
|
|
evidentially this works on x86 - but could cause issues later on.
add BLI_linklist_freeN() which MEM_freeN's each item.
|
|
D'Oliveiro.
|
|
|
|
not to confuse things.
|
|
|
|
|
|
|
|
building on osx.
|
|
path_util_split_dirstring_2.patch, path_util_split_dirstring_3.patch
from Lawrence D'Oliveiro (ldo)
Get rid of BLI_splitdirstring, replace with calls to BLI_split_dirfile, BLI_split_dir_part and BLI_split_file_part as appropriate.
|
|
from Lawrence D'Oliveiro (ldo)
BLI_dir_contents no longer changes current working directory.
|
|
from Lawrence D'Oliveiro (ldo)
more efficient implementation of BLI_file_size that doesn't open the file.
|
|
from Lawrence D'Oliveiro (ldo)
- storage.c: Simplify BLI_dir_contents and make it and its internal subsidiary routines reentrant
- Moved common code for disposal of a struct direntry to new routine BLI_free_filelist in storage.c, and put calls to it in interface_icons.c and filelist.c
- Took out inclusion of BLI_fileops_types.h from BLI_fileops.h and put it explicitly into .c files that need it (which turned out to be only 7 of the 35 files that were including the former)
|
|
from Lawrence D'Oliveiro (ldo)
More use of bool type, necessitating adding inclusion of BLI_utildefines.h, or moving it up in the inclusion order if it was already included, in various places
- storage.c: make some variables only used in bli_builddir local to that
- storage.c: BLI_file_descriptor_size should allow 0 as a valid file descriptor
- path_util.c: make pointers to non-reentrant storage returned from folder routines const, necessitating making variables holding these returned pointers const elsewhere as well
- path_util.c: BLI_string_to_utf8 closes iconv context in case of conversion error
- blf_lang.c: fill_locales routine now has its own "languages" local variable to construct paths (was stealing internal storage belonging to BLI_get_folder before)
|
|
|
|
|
|
|
|
BKE_utildefines is now unused but keep incase we want to add defines there later.
|