mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-18 22:54:00 +00:00
59 lines
1.9 KiB
Diff
59 lines
1.9 KiB
Diff
--- a/commandline.cpp
|
|
+++ b/commandline.cpp
|
|
@@ -642,30 +642,34 @@ bool CommandLine::Parse(int argc, char *argv[])
|
|
}
|
|
else
|
|
{
|
|
- // All other files must exist
|
|
+ // Originally, all specified files were supposed to exist, or the program
|
|
+ // would stop with an error message. This was not practical, for example in
|
|
+ // a directory with files appearing and disappearing (an active download directory).
|
|
+ // So the new rule is: when a specified file doesn't exist, it is silently skipped.
|
|
if (!DiskFile::FileExists(filename))
|
|
{
|
|
- cerr << "The source file does not exist: " << filename << endl;
|
|
- return false;
|
|
- }
|
|
-
|
|
- u64 filesize = DiskFile::GetFileSize(filename);
|
|
-
|
|
- // Ignore all 0 byte files
|
|
- if (filesize > 0)
|
|
- {
|
|
- extrafiles.push_back(ExtraFile(filename, filesize));
|
|
-
|
|
- // track the total size of the source files and how
|
|
- // big the largest one is.
|
|
- totalsourcesize += filesize;
|
|
- if (largestsourcesize < filesize)
|
|
- largestsourcesize = filesize;
|
|
- }
|
|
- else
|
|
- {
|
|
- cout << "Skipping 0 byte file: " << filename << endl;
|
|
- }
|
|
+ cout << "Ignoring non-existent source file: " << filename << endl;
|
|
+ }
|
|
+ else
|
|
+ {
|
|
+ u64 filesize = DiskFile::GetFileSize(filename);
|
|
+
|
|
+ // Ignore all 0 byte files
|
|
+ if (filesize > 0)
|
|
+ {
|
|
+ extrafiles.push_back(ExtraFile(filename, filesize));
|
|
+
|
|
+ // track the total size of the source files and how
|
|
+ // big the largest one is.
|
|
+ totalsourcesize += filesize;
|
|
+ if (largestsourcesize < filesize)
|
|
+ largestsourcesize = filesize;
|
|
+ }
|
|
+ else
|
|
+ {
|
|
+ cout << "Skipping 0 byte file: " << filename << endl;
|
|
+ }
|
|
+ } //end file exists
|
|
}
|
|
|
|
++fn;
|