aboutsummaryrefslogtreecommitdiff
path: root/src/com/cyanogenmod/filemanager/util/CommandHelper.java
Commit message (Collapse)AuthorAgeFilesLines
* Fix rename of files ending with . on sdcardemancebo2016-10-261-7/+33
| | | | | | | | | | | If sdcard is formatted as VFAT, then file names named as "foo." will be silently saved as "foo". This causes us to report the wrong target file to media scanner, which can cause an extra file to be shown in MTP mode on Windows. The workaround is to rescan the parent dir to discover the correct filename to report to media scanner. Change-Id: Ia58a341ef6190efe3dca8b13bbc081b6e2d4e9c1 Issue-Id: QRDL-983
* Fix MediaScan issue w/ DeletingStephen Bird2015-08-211-6/+53
| | | | | | | | | | Mediascan wasn't working with deletion of items. We need to grab the items to delete before actually deleting them from the file system so that we know which items we should have deleted. Change-Id: Ia7b6d5c0612b8053d6b3f442dc9cc9312b02e47b Ticket: QRDL-982
* Fixed MediaScan Issue w/ Directoriesherriojr2015-08-191-12/+81
| | | | | | | | | | | MediaScan wasn't being done recursively, so moving a directory which had content to a different location wouldn't include the children in the scan. This implementation makes sure all files and folders within the directory are also scanned. Tested against a dataset of 1000 videos, so performance seems fine. Change-Id: If3c94f92d96d2d78bb0664112ea235f3e3669363 Ticket: QRDL-1009
* MediaScanning: Update with calls to MediascannerStephen Bird2015-06-111-24/+22
| | | | | | | | With older versions of android, updating with .delete was the proper way to remove these items The issue is that, doing this does not update MTP. Change-Id: I9b7098927fbda6e78a9baedb5e5e35968c082108
* Implement ability to cancel file copy.Martin Brabham2015-04-131-1/+1
| | | | | | | | | | - Short circuit Java CopyCommand for move/copy when the user cancels the dialog. - Bubble up CancelledOperationException when the Cancel/Move operation is cancelled. Handle cancellation differently than success. Change-Id: I3e4426aaccf42e12bf299041d489e72b3b76a626 (cherry picked from commit 7e13ec2fa4fc052c2a880a8dba8ed871b3bc10ca)
* CM File Manager - Gracefully handle renaming on case-insensitive filesystemsRohit Yengisetty2015-03-211-2/+4
| | | | | | | | | | | Add edge case handling to move/copy commands wherein something is being renamed to a different-cased version of itself. Ex : renaming 'mydocuments' to 'MyDocuments' https://jira.cyanogenmod.org/browse/BACON-3074 Change-Id: Id90de5fd083e341371f250c0194f200388cf4941
* CMFileManager:Martin Brabham2014-12-171-2/+4
| | | | | | | | | - Use Environment function to be more compatible. - Take into account the directory sizes - Fix usage dialog jumping on first open. - Fix Java DiskUsageCommand to return correct DiskUsage based on MountPoint Change-Id: I62c4e734a99f5eba8eb596db360e760cb8404b51
* CMFileManager : Delete from media store when renaming/deleting filesDanesh M2014-12-141-8/+12
| | | | Change-Id: I0bee07a683a7799fb118eb2d1ac313654a29a64e
* cmfm: secure storage and other improvementsJorge Ruesga2014-11-101-133/+381
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for virtual filesystems and implements a SecureStorage filesystem (a password protected area) mounted in /storage or /sdcard/storage (in chrooted environments). Also includes a better print support and a cleanup of the code and design of the menu drawer. Bump version to 2.0.0 Required: https://github.com/jruesga/android_external_libtruezip located in external/libtruezip Patchset 4: Fix selection of unmounted virtual storages. Fix actions on virtual mount points folders. Fix strings and typos. Change drop for delete secure storage. Patchset 5: Move actionbar buttons to navigation drawer Remove history position Patchset 6: Update theme preview images Fix filesystem status image on theme change Patchset 7: Fix binary file detection in editor (including unicode files) Patchset 8: Fix unsafe operations in virtual mountpoint logic Patchset 9: Rebase Change-Id: I65511352ca649dcbf238c8b07cf8c22465296e8e Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
* CMFM: Notify to media scanner when some file changedJorge Ruesga2013-10-091-0/+43
| | | | | | | Patchset 2: Remove unnecessary calls to media scan Change-Id: Ie56ccdd992e2a93c63ab7587135de7cb63bff92e Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
* CMFM: Editor initial highlight support + props syntax processor + others ↵Jorge Ruesga2013-03-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | features - This change enables support of syntax highlight in editor. Adds also the next syntax processors: * PropertiesSyntaxHighlightProcessor - Option for toggle "no suggestion" in editor - CleanUp Patchset 2: Theme color scheme support Patchset 3: Hexdump binary editor preference No suggestions editor preference Syntax Highlight color scheme Add android-syntax-highlight (CMFM) and color-picker-view libraries ColorPickerDialog and ColorPickerPreference Separate preference to its own file Extract themes strings from dark_theme.xml to strings.xml Rebased Change-Id: I9df65e6193d46ebafadee5d545dcde1fc5ce20e9 Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
* CMFM: CYAN-200 - Archiving and Extracting .ZIP files in CM File ManagerJorge Ruesga2013-03-171-3/+12
| | | | | | | | | | | | | | | | Added support for zip and unrar commands. Zip, unzip, unlzma, unxz, uncompress and unrar are now optional. Compress or uncompress of these types are only available if its commands are present in filesystem NOTE: This change requires that zip and unrar commands are present in the filesystem at /system/xbin, which actually don't. Patchset 2: Rebased Change-Id: I30667c802bc5b678015b28bb3170377ceb37a1b8 JIRA: https://jira.cyanogenmod.org/browse/CYAN-200 Bugfix: CYAN-200 Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
* CMFM: CYAN-285 - Add ability to calculate file checksumsJorge Ruesga2013-03-161-0/+36
| | | | | | | | | | | Added support for compute MD5 and SHA1 file checksums Patchset 2: Remove trailing whitespaces Change-Id: I46cbd0d451eea76e259bdddc485774bbfd34cdc0 JIRA: https://jira.cyanogenmod.org/browse/CYAN-285 Bugfix: CYAN-285 Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
* CMFM: CYAN-533 - Increase timeout in File ManagerJorge Ruesga2013-03-101-1/+38
| | | | | | | | | | | Fixed timeout problems with list, copy, move and delete commands. Check new data for list commands; use indefinitely wait for copy, move and delete commands. Tested with 5000 and 30000 files. Change-Id: I33cd6c9b7422966cdc4bc0c9cb265f74533ef161 JIRA: https://jira.cyanogenmod.org/browse/CYAN-533 Bugfix: CYAN-533 Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
* CMFM: Fix invalid initial directoryJorge Ruesga2013-03-091-1/+3
| | | | | | | | Some paths, like /data/media/0, are being reported as invalid by libcore. Use a double check to detect these invalid paths Change-Id: I0f578b3e60849ab53c877daaee7c9577fc0c83dc Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
* CMFM: Do not use cd and pwd commandsJorge Ruesga2013-01-091-63/+0
| | | | | | | | Remove cd and pwd commands and use / as working directory for shell process (this commands are not used). This prevents that storage volumes from get busy on unmount file systems. Signed-off-by: jruesga <jorge@ruesga.com> Change-Id: I772866c00233351f505b61f53d43bac5de02a5e4
* CMFM: Fixes and ImprovementsJorge Ruesga2013-01-051-35/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Some performance improvements: - Use stat instead of ls. This allow improve listing of directories with symlinks. Symlinks are resolved by File.getCanonicalFile. - Simplify ls, fileinfo, find and readlink command - Simplify the parsing of FolderUsage (only type, size and category is required), and avoid to load a lot of on unused objects - Add new file datetime information from stat: access, change and modify - Improve list, find and resolvelink java commands * FadeEffect and symlink handling * Remove context from AIDHelper and add new helpful methods * New getAbsolutePath method * Use file separator for paths and ROOT_DIRECTORY for root directory path * Organize startup - Initialize variables prior to register receivers - Load AID data for improve performance through caching - Load the theme base used by AOSP widgets * Allow Editor to show zero-length files Allow the editor to load zero-length files (like /proc/mounts) and change the buffer type to no editable in binary files. * Invert allowed mount points detection. This change inverts the algorithm for prevent unmount needed rw filesystems. Now uses known restricted filesystems instead of known allowed filesystems. Now filesystems like yaffs2, fuse, and other linux filesystems are allowed by default. * Remove unused xliff namespace * Add flagNoFullscreen to EditText widgets * Fix listview selectors of history and bookmarks * Fix race condition When the command was executed prior to block the execution, the thread wait for the timeout. Add a sync access check to ensure that prior to lock and wait the program executed is not finished. * Fix for async programs When the partial buffer received for an async program is not complete (ends with a EOL), the partial buffer was discarded. Add a new buffer with this lost chars to complete this bytes next time * Fix list command Use -n1 for xargs in list command to prevent "argument line too long" * If parent is null then assume that it is the root folder * Use only name and parent for equals method on FileSystemObject A FileSystemObject is the same if his name and path are the same. * Increase performance of adapters Use argument data when possible to avoid call the adapter methods * Do not clear selection on some actions Actions like create new file/folder, show properties and other actions that explicit requires clear the active selection, shouldn't removed the active selection. * Add a new additional line to dialog messages to fill the dialog * Fix spanish translations * Fix theme roulette on tablets * Clean NLS and Override warnings * Fix parse size data with dots * Add listeners after set the values to avoid raising triggers * Increase performance of adapters. Notify the data changed at the end of the changes, and only to super adapters (the internal structure has already been updated) * Ensure that all the Cursor references were closed after used them. * Remove unused SuppressLint * Clean up Change-Id: I4326e97cbc942c767829f1a0ff6b380ad768cfef Signed-off-by: jruesga <jorge@ruesga.com>
* CMFileManager: Fix mv operation on Cross-device link failureJorge Ruesga2012-11-051-27/+76
| | | | | | | | | | | | | | Issue https://github.com/jruesga/CMFileManager/issues/31. The busybox mv command returns a failure when files are moved between filesystem (Cross-device link failure). This changes fix this failure by: * Replace mv command for a "mv or cp+rm" operation. * rm operation occurs over source mount point so this need to be mounted prior to execute this new command. * Fix the stderr buffer filling on error. Change-Id: If113ad810e7daffeb8379589789b2855eda14908
* Change application name to 'File Manager' (issue #20)jruesga2012-10-261-0/+1699
Full refactoring of package from explorer to filemanager