Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 31883 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.patch
par2cmdline-0.4-wildcard-fix.patch (text/plain), 1.42 KB, created by
Bardur Arantsson
on 2004-05-23 05:51:07 UTC
(
hide
)
Description:
par2cmdline-0.4-wildcard-fix.patch
Filename:
MIME Type:
Creator:
Bardur Arantsson
Created:
2004-05-23 05:51:07 UTC
Size:
1.42 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-23 14:13:07.019208898 +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>; >@@ -646,7 +652,8 @@ > { > if (name.size() >= wildcard.size() && > name.substr(0, where) == front && >- name.substr(name.size()-back.size()) == back) >+ name.substr(name.size()-back.size()) == back && >+ is_regular_file(path + name)) > { > matches->push_back(path + name); > } >@@ -665,7 +672,7 @@ > ++pn; > } > >- if (pw == wildcard.end()) >+ if (pw == wildcard.end() && is_regular_file(path + name)) > { > matches->push_back(path + name); > } >@@ -676,14 +683,9 @@ > closedir(dirp); > } > } >- else >+ else if (is_regular_file(path + wildcard)) > { >- struct stat st; >- string fn = path + wildcard; >- if (stat(fn.c_str(), &st) == 0) >- { >- matches->push_back(path + wildcard); >- } >+ matches->push_back(path + wildcard); > } > > 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