unrar: Update from 5.3.2 to 5.4.5
[termux-packages] / packages / unrar / filefn.cpp.patch
1 diff -u -r ../unrar/filefn.cpp ./filefn.cpp
2 --- ../unrar/filefn.cpp 2016-08-14 21:17:47.000000000 +0200
3 +++ ./filefn.cpp 2017-01-31 12:52:24.009280586 +0100
4 @@ -29,12 +29,6 @@
5 WideToChar(Name,NameA,ASIZE(NameA));
6 mode_t uattr=SetAttr ? (mode_t)Attr:0777;
7 int ErrCode=mkdir(NameA,uattr);
8 -#ifdef _ANDROID
9 - if (ErrCode==-1 && errno!=ENOENT)
10 - ErrCode=JniMkdir(Name) ? 0 : -1; // If external card is read-only for usual file API.
11 - if (ErrCode!=-1)
12 - JniFileNotify(Name,false);
13 -#endif
14 if (ErrCode==-1)
15 return errno==ENOENT ? MKDIR_BADPATH:MKDIR_ERROR;
16 return MKDIR_SUCCESS;
17 @@ -426,15 +420,6 @@
18 WideToChar(SrcName,SrcNameA,ASIZE(SrcNameA));
19 WideToChar(DestName,DestNameA,ASIZE(DestNameA));
20 bool Success=rename(SrcNameA,DestNameA)==0;
21 -#ifdef _ANDROID
22 - if (!Success)
23 - Success=JniRename(SrcName,DestName); // If external card is read-only for usual file API.
24 - if (Success)
25 - {
26 - JniFileNotify(SrcName,true);
27 - JniFileNotify(DestName,false);
28 - }
29 -#endif
30 return Success;
31 #endif
32 }
33 @@ -455,12 +440,6 @@
34 char NameA[NM];
35 WideToChar(Name,NameA,ASIZE(NameA));
36 bool Success=remove(NameA)==0;
37 -#ifdef _ANDROID
38 - if (!Success)
39 - Success=JniDelete(Name);
40 - if (Success)
41 - JniFileNotify(Name,true);
42 -#endif
43 return Success;
44 #endif
45 }