"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/xfeutils.cpp" between
xfe-1.42.tar.gz and xfe-1.43.tar.gz

About: Xfe (X File Explorer) is a file manager and browser (using the FOX toolkit).

xfeutils.cpp  (xfe-1.42):xfeutils.cpp  (xfe-1.43)
skipping to change at line 1067 skipping to change at line 1067
const FXString suffix = _("copy"); const FXString suffix = _("copy");
FXString copytarget; FXString copytarget;
FXString copystr = " (" + suffix; FXString copystr = " (" + suffix;
FXString name = FXPath::name(target); FXString name = FXPath::name(target);
// Get file extensions // Get file extensions
FXString ext1 = name.rafter('.', 1); FXString ext1 = name.rafter('.', 1);
FXString ext2 = name.rafter('.', 2); FXString ext2 = name.rafter('.', 2);
FXString ext3 = ext2.before('.'); FXString ext3 = ext2.before('.');
FXString ext4 = name.before('.');
// Handle the special case of compressed tar archive names // Case of dot file names (hidden files or folders)
if (ext3.lower() == "tar") if (name.before('.') == "")
{
int pos = target.rfind(copystr);
// First copy
if (pos < 0)
{
copytarget = target + copystr + ")";
}
// Add a number to the suffix for next copies
else
{
FXString strnum = target.mid(pos+copystr.length(), target
.length()-pos-copystr.length());
FXuint num = FXUIntVal(strnum);
num = (num == 0 ? num +2 : num +1);
copytarget = target.left(pos) + copystr + " " + FXStringV
al(num) + ")";
}
}
// Case of compressed tar archive names
else if (ext3.lower() == "tar")
{ {
FXString basename = target.rbefore('.', 2); FXString basename = target.rbefore('.', 2);
int pos = basename.rfind(copystr); int pos = basename.rfind(copystr);
if (pos < 0) if (pos < 0)
{ {
copytarget = basename + copystr + ")." + ext2; copytarget = basename + copystr + ")." + ext2;
} }
else else
skipping to change at line 1615 skipping to change at line 1637
if (childpid >= 0) if (childpid >= 0)
{ {
if (childpid == 0) // Child if (childpid == 0) // Child
{ {
st(nbargs, args); st(nbargs, args);
exit(EXIT_SUCCESS); exit(EXIT_SUCCESS);
} }
else // Parent else // Parent
{ {
// Non blocking wait for child // Non blocking wait for child
if (waitpid(childpid, NULL, WNOHANG) < 0) //if (waitpid(childpid, NULL, WNOHANG) < 0)
if (waitpid(childpid, NULL, 0) < 0)
{ {
res = -1; res = -1;
} }
else else
{ {
res = 0; res = 0;
} }
} }
} }
 End of changes. 3 change blocks. 
3 lines changed or deleted 28 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)