diff options
| author | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2010-02-14 15:12:08 +0100 |
|---|---|---|
| committer | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2010-02-14 15:12:08 +0100 |
| commit | d338f1f0c1a72665396d95bfe303ed408a3f10b9 (patch) | |
| tree | c41c71b380e1b749a49518a57edd3453a3733a5f /UCore.pas | |
| parent | 55605a80092452ce593cb05df12a404ad47aa808 (diff) | |
| download | tuxcmd-0.6.76.tar.xz | |
Show warning when some files are unreadablev0.6.76
This will make user aware of what files will not be copied, chmodded or chowned.
Diffstat (limited to 'UCore.pas')
| -rw-r--r-- | UCore.pas | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -28,7 +28,7 @@ function FillPanel(List: TList; ListView: TGTKListView; Engine: TPanelEngine; Le procedure FindNextSelected(ListView: TGTKListView; DataList: TList; var Item1, Item2: string); procedure UnselectAll(ListView: TGTKListView; DataList: TList); -procedure FillDirFiles(Engine: TPanelEngine; DestList: TList; InputFiles: TStringList; DoNotRecurse, SortForStream: boolean); +procedure FillDirFiles(Engine: TPanelEngine; DestList: TList; InputFiles: TStringList; DoNotRecurse, SortForStream: boolean; InaccessiblePaths: TStringList); function GetFileInfoSL(Engine: TPanelEngine; const APath: string): PDataItemSL; procedure DebugWriteListSL(List: TList); @@ -348,7 +348,7 @@ end; (********************************************************************************************************************************) (********************************************************************************************************************************) -procedure FillDirFiles(Engine: TPanelEngine; DestList: TList; InputFiles: TStringList; DoNotRecurse, SortForStream: boolean); +procedure FillDirFiles(Engine: TPanelEngine; DestList: TList; InputFiles: TStringList; DoNotRecurse, SortForStream: boolean; InaccessiblePaths: TStringList); var DirStage1List, FilesList, DirStage2List: TList; function FillDirFiles_compare_func(Item1, Item2: Pointer): integer; @@ -442,7 +442,7 @@ var DirStage1List, FilesList, DirStage2List: TList; if Engine.ChangeDir(ParentDir, @Error) then FillDirFiles_Recurse(ParentDir, ALevel + 1) else begin - // * TODO: report and handle errors? we should make sure that user knows some of his data won't be copied + InaccessiblePaths.Add(ParentDir); DebugMsg(['*** FillDirFiles_Recurse: error changing dir to ''', LocalPath, ''': ', Error^.message]); g_error_free(Error); end; @@ -454,7 +454,7 @@ var DirStage1List, FilesList, DirStage2List: TList; end; end; end else begin - // * TODO: report and handle errors? we should make sure that user knows some of his data won't be copied + InaccessiblePaths.Add(LocalPath); DebugMsg(['*** FillDirFiles_Recurse: error getting listing of ''', LocalPath, ''': ', Error^.message]); g_error_free(Error); // Clear remaining items (in case of error) @@ -477,6 +477,7 @@ begin for i := 0 to InputFiles.Count - 1 do begin root := GetFileInfoSL(Engine, InputFiles[i]); if (root = nil) then begin + InaccessiblePaths.Add(InputFiles[i]); DebugMsg(['FillDirFiles: cannot stat ', InputFiles[i]]); Exit; end; |
