Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 31931 Details for
Bug 51817
app-arch/par2cmdline v0.4: wildcard expansion fix
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
par2cmdline-0.4-wildcard-fix-2.patch
par2cmdline-0.4-wildcard-fix.patch (text/plain), 1.84 KB, created by
Bardur Arantsson
on 2004-05-24 00:07:08 UTC
(
hide
)
Description:
par2cmdline-0.4-wildcard-fix-2.patch
Filename:
MIME Type:
Creator:
Bardur Arantsson
Created:
2004-05-24 00:07:08 UTC
Size:
1.84 KB
patch
obsolete
>diff -ur par2cmdline-0.4/diskfile.cpp par2cmdline-0.4.patched/diskfile.cpp >--- par2cmdline-0.4/diskfile.cpp 2004-04-12 13:25:37.000000000 +0200 >+++ par2cmdline-0.4.patched/diskfile.cpp 2004-05-24 08:56:45.219368207 +0200 >@@ -618,6 +618,12 @@ > return result; > } > >+bool is_regular_file(const string &p) >+{ >+ struct stat st; >+ return (stat(p.c_str(), &st) == 0 && S_ISREG(st.st_mode)); >+} >+ > list<string>* DiskFile::FindFiles(string path, string wildcard) > { > list<string> *matches = new list<string>; >@@ -648,7 +654,15 @@ > name.substr(0, where) == front && > name.substr(name.size()-back.size()) == back) > { >- matches->push_back(path + name); >+ if (is_regular_file(path + name)) >+ { >+ matches->push_back(path + name); >+ } >+ else >+ { >+ cerr << "Warning: '" << (path + name) >+ << "' ignored; not a regular file" << endl; >+ } > } > } > else >@@ -667,7 +681,15 @@ > > if (pw == wildcard.end()) > { >- matches->push_back(path + name); >+ if (is_regular_file(path + name)) >+ { >+ matches->push_back(path + name); >+ } >+ else >+ { >+ cerr << "Warning: '" << (path + name) >+ << "' ignored; not a regular file" << endl; >+ } > } > } > } >@@ -678,12 +700,15 @@ > } > else > { >- struct stat st; >- string fn = path + wildcard; >- if (stat(fn.c_str(), &st) == 0) >+ if (is_regular_file(path + wildcard)) > { > matches->push_back(path + wildcard); > } >+ else >+ { >+ cerr << "Warning: '" << (path + wildcard) >+ << "' ignored; not a regular file" << endl; >+ } > } > > return matches;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 51817
:
31883
|
31884
| 31931 |
84110
|
354700