38 Commits

Author SHA1 Message Date
ShadowNinja
835cc3f27f Fix RemoveRelatvePathComponents
This used to return "/foo" for "../foo" when it should return the enpty
string (i.e., error removing all relative components).
2016-12-20 17:17:38 +10:00
ShadowNinja
585b53d841 Fix fs::RemoveRelativePathComponents for paths with a leading dot component
Previously, paths like ./worlds would be resolved to /worlds since the
leading dot was considered just as irrelevant as a dot in the middle of
the path.
2016-11-24 10:38:23 -05:00
gregorycu
02373da739 Use MoveFileEx to rename files on Windows (not rename) 2016-05-01 17:28:16 +10:00
Perttu Ahola
ab03f0a341 filesys: safeWriteToFile(): Remove the target file before rename only on Windows
Removing the target file on other platforms was enabled likely unintentionally
by commit 5f1f1151d3a9c113902630adc16cc3f4845da7ba.

This may be the reason why there has been corruption of files on Linux on hard
shutdowns.

Previously I described the problem and this fix in issue #3084.
2016-01-01 18:21:18 +02:00
ShadowNinja
7ea2518b09 Add seperate cache path
This is set to the XDG cache path where possible.
It's set to the app's cache path on Android.
2015-12-07 13:51:41 -05:00
Diego Martinez
b650330604 Windows: Fix some warnings. 2015-07-09 01:52:28 +02:00
ShadowNinja
1008aefa8c Add mod security
Due to compatibility concerns, this is temporarily disabled.
2015-05-16 18:32:31 -04:00
kwolekr
25edaf443c Tests: Modularize unit testing
Split unit tests into separate files under src/unittest/
Give better unittest diagnostics
Clean up some code
2015-04-26 15:08:54 -04:00
kwolekr
55d3aa7960 Schematics: Prepend mod path to relative schematic filepaths 2015-04-08 00:28:56 -04:00
ShadowNinja
7b4c575117 Fix fs::GetRecursiveSubPaths trying to get directory lists for files 2014-12-24 17:23:07 -05:00
SmallJoker
358737b184 Rewrite fs:GetDirListing(file) by kahrl 2014-12-10 02:59:10 +10:00
SmallJoker
84eb8d7d38 Ignore .name directories and files
Signed-off-by: Craig Robbins <kde.psych@gmail.com>
2014-12-10 02:49:02 +10:00
selat
2e451a4181 Remove temporary file at safeWriteToFile() 2014-08-16 12:46:48 +02:00
sapier
268ff61168 Add support for Android 2.3+
There have been plenty of ppl involved in creating this version.
I don't wanna mention names as I'm sure I'd forget someone so I
just tell where help has been done:
- The partial android versions done by various ppl
- Testing on different android devices
- reviewing code (especially the in core changes)
- testing controls
- reviewing texts

A big thank you to everyone helping this to be completed!
2014-06-29 18:17:56 +02:00
Kahrl
ee90d438b8 Omnicleanup: header cleanup, add ModApiUtil shared between game and mainmenu 2013-08-14 21:03:33 +02:00
PilzAdam
282c40cdeb Dont write directly to files but rather write and copy a tmp file 2013-08-13 22:05:45 +02:00
Kahrl
3ec3564770 Fix various memory access problems detected by valgrind 2013-08-07 19:48:31 +02:00
sapier
62794622d6 Replace C++ mainmenu by formspec powered one 2013-07-02 19:58:20 -04:00
Sfan5
3fab3825aa Update Copyright Years 2013-02-24 20:15:24 +01:00
PilzAdam
269f01224b Change Minetest-c55 to Minetest 2013-02-24 18:49:03 +01:00
Perttu Ahola
e70b6545b1 Switch the license to be LGPLv2/later, with small parts still remaining as GPLv2/later, by agreement of major contributors 2012-06-05 18:54:07 +03:00
Perttu Ahola
498ee8f966 Add #include <unistd.h> to filesys.cpp 2012-04-06 14:56:14 +03:00
Perttu Ahola
70ae1d65ae Better file/directory removal platform code and utilities 2012-03-26 08:36:59 +03:00
Perttu Ahola
3a21562607 Small fix to fs::GetDirListing when trying to list an inexistent directory 2012-03-25 23:16:53 +03:00
Perttu Ahola
20078e886f Fix filesys.cpp debug output to go into debug.txt 2012-03-23 00:05:32 +02:00
Perttu Ahola
1b670a293b Fix CreateAllDirs() (failed for relative fully non-existing path) 2012-03-11 16:06:32 +02:00
Perttu Ahola
520200d597 Check symlinks with stat() to know if they are directories or not 2011-12-04 13:02:00 +02:00
Perttu Ahola
ab67985d21 Add support for unix filesystems which yield DT_UNKNOWN in dirent->d_type, falling back on stat(). 2011-12-04 12:49:58 +02:00
Perttu Ahola
67a6bc4ab5 Fix map delete on windows (concatenate paths correctly with / or \ depending on OS) 2011-10-16 16:16:47 +03:00
Perttu Ahola
bc847e8cc2 Fix bug in posix file/directory removal wrapper, as pointed out by kahrl 2011-09-06 17:52:03 +03:00
Perttu Ahola
c4b707bca2 Windows.h -> windows.h for cross-mingw build 2011-08-14 21:26:07 +03:00
Ciaran Gultnieks
e09fec3373 New map directory structure that avoids map size being limited by filesystem 2011-05-18 16:48:27 +01:00
Perttu Ahola
a0f0517c5b should work now 2011-01-26 01:06:45 +02:00
Perttu Ahola
b456821680 Little fixes 2011-01-26 00:49:32 +02:00
Perttu Ahola
035345f13d Map deletion button 2011-01-26 00:40:33 +02:00
Perttu Ahola
d38ac3aae3 removed boost support from filesys.cpp; default to posix 2011-01-07 14:52:27 +02:00
Perttu Ahola
fc26dcdb19 license stuff
--HG--
rename : src/licensecomment.txt => licensecomment.txt
2010-11-29 20:13:04 +02:00
Perttu Ahola
4e249fb3fb Initial files 2010-11-27 01:02:21 +02:00